From 01fe9cc87eb9ca8844fd493b876fd62cbea3f72b Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Thu, 13 Mar 2014 05:47:04 -0400 Subject: [PATCH] Added Config Setting for Limbo Escape Added a configuration option for toggling whether players can teleport out of Limbo by walking over Eternal Fabric. This became viable after Rift Gateways began generating in Limbo again. Keybounce has expressed an interest in using option to deal with the issue of players returning home since his Overworld won't have gateways. --- .../mod_pocketDim/blocks/BlockDimWallPerm.java | 3 ++- .../mod_pocketDim/config/DDWorldProperties.java | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/blocks/BlockDimWallPerm.java b/src/main/java/StevenDimDoors/mod_pocketDim/blocks/BlockDimWallPerm.java index 42a2d1e0..d3dac454 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/blocks/BlockDimWallPerm.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/blocks/BlockDimWallPerm.java @@ -51,7 +51,8 @@ public class BlockDimWallPerm extends Block @Override public void onEntityWalking(World world, int x, int y, int z, Entity entity) { - if (!world.isRemote && world.provider.dimensionId == properties.LimboDimensionID) + if (!world.isRemote && world.provider.dimensionId == properties.LimboDimensionID + && mod_pocketDim.worldProperties.LimboEscapeEnabled) { World overworld = DimensionManager.getWorld(0); if (overworld != null && entity instanceof EntityPlayerMP) diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/config/DDWorldProperties.java b/src/main/java/StevenDimDoors/mod_pocketDim/config/DDWorldProperties.java index f669ded5..db2a4988 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/config/DDWorldProperties.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/config/DDWorldProperties.java @@ -13,6 +13,12 @@ public class DDWorldProperties public final DimensionFilter RiftClusterDimensions; public final DimensionFilter RiftGatewayDimensions; + /** + * General Flags + */ + public final boolean LimboEscapeEnabled; + + //Names of categories private static final String CATEGORY_WORLD_GENERATION = "world generation"; @@ -33,6 +39,11 @@ public class DDWorldProperties RiftClusterDimensions = loadFilter(config, "Rift Cluster", "Rift Clusters"); RiftGatewayDimensions = loadFilter(config, "Rift Gateway", "Rift Gateways"); + LimboEscapeEnabled = config.get(Configuration.CATEGORY_GENERAL, "Enable Limbo Escape", true, + "Sets whether players are teleported out of Limbo when walking over the Eternal Fabric that " + + "generates near the bottom of the dimension. If disabled, players could still leave through " + + "dungeons in Limbo or by dying (if Hardcore Limbo is disabled). The default value is true.").getBoolean(true); + config.save(); }