diff --git a/banned-ips.json b/banned-ips.json deleted file mode 100644 index 0637a088..00000000 --- a/banned-ips.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/banned-players.json b/banned-players.json deleted file mode 100644 index 0637a088..00000000 --- a/banned-players.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/eula.txt b/eula.txt deleted file mode 100644 index c7ba20ee..00000000 --- a/eula.txt +++ /dev/null @@ -1,3 +0,0 @@ -#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula). -#Thu Feb 19 14:13:34 EST 2015 -eula=true \ No newline at end of file diff --git a/ops.json b/ops.json deleted file mode 100644 index 0637a088..00000000 --- a/ops.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/server.properties b/server.properties deleted file mode 100644 index 2b6ea534..00000000 --- a/server.properties +++ /dev/null @@ -1,33 +0,0 @@ -#Minecraft server properties -#Thu Feb 19 17:21:32 EST 2015 -generator-settings= -op-permission-level=4 -allow-nether=true -level-name=world -enable-query=false -allow-flight=false -announce-player-achievements=true -server-port=25565 -level-type=DEFAULT -enable-rcon=false -force-gamemode=false -level-seed= -server-ip= -max-build-height=256 -spawn-npcs=true -white-list=false -spawn-animals=true -hardcore=false -snooper-enabled=true -online-mode=true -resource-pack= -pvp=true -difficulty=1 -enable-command-block=false -gamemode=0 -player-idle-timeout=0 -max-players=20 -spawn-monsters=true -generate-structures=true -view-distance=10 -motd=A Minecraft Server diff --git a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java index f25c6892..0a340cc6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java +++ b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java @@ -34,6 +34,9 @@ public class BloodMagicConfiguration public static final String CATEGORY_GAMEPLAY = "gameplay"; + public static String[] teleposerBlacklist; + public static String[] blacklist = {}; + public static void init(File configFile) { for (String s : DEFAULT_COLOR_LIST.split(";")) @@ -136,7 +139,9 @@ public class BloodMagicConfiguration AlchemicalWizardry.ritualDisabledSpawnWard = config.get("Ritual Blacklist", "Ward of Sacrosanctity", false).getBoolean(false); AlchemicalWizardry.ritualDisabledVeilOfEvil = config.get("Ritual Blacklist", "Veil of Evil", false).getBoolean(false); AlchemicalWizardry.ritualDisabledFullStomach = config.get("Ritual Blacklist", "Requiem of the Satiated Stomach", false).getBoolean(false); - + + teleposerBlacklist = config.get("Teleposer Blacklist", "Blacklist", blacklist, "Stops specified blocks from being teleposed. Put entries on new lines. Valid syntax is: \nmodid:blockname:meta").getStringList(); + String tempDemonConfigs = "Demon Configs"; TEDemonPortal.buildingGridDelay = config.get(tempDemonConfigs, "Building Grid Delay", 25).getInt(); TEDemonPortal.roadGridDelay = config.get(tempDemonConfigs, "Road Grid Delay", 10).getInt(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java index ace56f5f..f9299dec 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java @@ -30,6 +30,8 @@ public class ConfigGui extends GuiConfig { list.add(new ConfigElement(config.getCategory("wellofsufferingblacklist".toLowerCase()))); list.add(new ConfigElement(config.getCategory("wimpysettings".toLowerCase()))); list.add(new ConfigElement(config.getCategory("ritual blacklist".toLowerCase()))); + list.add(new ConfigElement(config.getCategory("teleposer blacklist".toLowerCase()))); + list.add(new ConfigElement(config.getCategory("demon configs".toLowerCase()))); return list; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java index 9304910b..4fba312a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java @@ -6,6 +6,8 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import WayofTime.alchemicalWizardry.api.event.TeleposeEvent; +import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; @@ -31,6 +33,7 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn; +import net.minecraftforge.oredict.OreDictionary; import vazkii.botania.api.internal.IManaBurst; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.BloodMagicConfiguration; @@ -676,6 +679,31 @@ public class AlchemicalWizardryEventHooks } } + @SubscribeEvent(priority = EventPriority.LOWEST) + public void onTelepose(TeleposeEvent event) { + for (int i = 0; i < BloodMagicConfiguration.teleposerBlacklist.length; i++) { + String[] blockData = BloodMagicConfiguration.teleposerBlacklist[i].split(":"); + + if (blockData.length == 3) { + + Block block = GameRegistry.findBlock(blockData[0], blockData[1]); + int meta; + + // Check if it's an int, if so, parse it. If not, set to 0 to avoid crashing. + if (blockData[2].matches("-?\\d+")) + meta = Integer.parseInt(blockData[2]); + else if (blockData[2].equals("*")) + meta = OreDictionary.WILDCARD_VALUE; + else + meta = 0; + + if (block != null) + if (( block == event.initialBlock || block == event.finalBlock) && ( meta == event.initialMetadata || meta == event.finalMetadata || meta == OreDictionary.WILDCARD_VALUE)) + event.setCanceled(true); + } + } + } + @SubscribeEvent public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { if (event.modID.equals("AWWayofTime")) { diff --git a/usercache.json b/usercache.json deleted file mode 100644 index 0637a088..00000000 --- a/usercache.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/whitelist.json b/whitelist.json deleted file mode 100644 index 0637a088..00000000 --- a/whitelist.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/world/DIM-1/data/villages.dat b/world/DIM-1/data/villages.dat deleted file mode 100644 index 33ca9d88..00000000 Binary files a/world/DIM-1/data/villages.dat and /dev/null differ diff --git a/world/DIM-1/forcedchunks.dat b/world/DIM-1/forcedchunks.dat deleted file mode 100644 index e4345475..00000000 Binary files a/world/DIM-1/forcedchunks.dat and /dev/null differ diff --git a/world/DIM-1/multipart.dat b/world/DIM-1/multipart.dat deleted file mode 100644 index ffe9e925..00000000 Binary files a/world/DIM-1/multipart.dat and /dev/null differ diff --git a/world/DIM1/data/villages.dat b/world/DIM1/data/villages.dat deleted file mode 100644 index 33ca9d88..00000000 Binary files a/world/DIM1/data/villages.dat and /dev/null differ diff --git a/world/DIM1/forcedchunks.dat b/world/DIM1/forcedchunks.dat deleted file mode 100644 index e4345475..00000000 Binary files a/world/DIM1/forcedchunks.dat and /dev/null differ diff --git a/world/DIM1/multipart.dat b/world/DIM1/multipart.dat deleted file mode 100644 index ffe9e925..00000000 Binary files a/world/DIM1/multipart.dat and /dev/null differ diff --git a/world/data/villages.dat b/world/data/villages.dat deleted file mode 100644 index 33ca9d88..00000000 Binary files a/world/data/villages.dat and /dev/null differ diff --git a/world/forcedchunks.dat b/world/forcedchunks.dat deleted file mode 100644 index e4345475..00000000 Binary files a/world/forcedchunks.dat and /dev/null differ diff --git a/world/level.dat b/world/level.dat deleted file mode 100644 index 5e8991d5..00000000 Binary files a/world/level.dat and /dev/null differ diff --git a/world/level.dat_old b/world/level.dat_old deleted file mode 100644 index 2c2274fa..00000000 Binary files a/world/level.dat_old and /dev/null differ diff --git a/world/multipart.dat b/world/multipart.dat deleted file mode 100644 index ffe9e925..00000000 Binary files a/world/multipart.dat and /dev/null differ diff --git a/world/region/r.-1.-1.mca b/world/region/r.-1.-1.mca deleted file mode 100644 index 3deddd5e..00000000 Binary files a/world/region/r.-1.-1.mca and /dev/null differ diff --git a/world/region/r.-1.0.mca b/world/region/r.-1.0.mca deleted file mode 100644 index 590d8d9f..00000000 Binary files a/world/region/r.-1.0.mca and /dev/null differ diff --git a/world/region/r.0.-1.mca b/world/region/r.0.-1.mca deleted file mode 100644 index 321e5ead..00000000 Binary files a/world/region/r.0.-1.mca and /dev/null differ diff --git a/world/region/r.0.0.mca b/world/region/r.0.0.mca deleted file mode 100644 index 0f4bfa4b..00000000 Binary files a/world/region/r.0.0.mca and /dev/null differ diff --git a/world/session.lock b/world/session.lock deleted file mode 100644 index 49b485f4..00000000 Binary files a/world/session.lock and /dev/null differ