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.
This commit is contained in:
SenseiKiwi 2014-03-13 05:47:04 -04:00
parent f40e1e0a91
commit 01fe9cc87e
2 changed files with 13 additions and 1 deletions

View file

@ -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)

View file

@ -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();
}