Minor Change

Just sprucing up some config stuff...
This commit is contained in:
SenseiKiwi
2014-03-06 18:27:03 -04:00
parent bbd0b1d0fe
commit a8e37da4bc
2 changed files with 14 additions and 5 deletions

View File

@@ -96,6 +96,7 @@ public class DDProperties
public final boolean LimboReturnsInventoryEnabled; public final boolean LimboReturnsInventoryEnabled;
public final boolean DoorRenderingEnabled; public final boolean DoorRenderingEnabled;
public final boolean TNFREAKINGT_Enabled; public final boolean TNFREAKINGT_Enabled;
public final boolean MonolithTeleportationEnabled;
/** /**
@@ -118,6 +119,7 @@ public class DDProperties
//Names of categories //Names of categories
private final String CATEGORY_CRAFTING = "crafting"; private final String CATEGORY_CRAFTING = "crafting";
private final String CATEGORY_ENTITY = "entity"; private final String CATEGORY_ENTITY = "entity";
private final String CATEGORY_SPECIAL = "special";
private final String CATEGORY_DIMENSION = "dimension"; private final String CATEGORY_DIMENSION = "dimension";
private final String CATEGORY_PROVIDER = "provider"; private final String CATEGORY_PROVIDER = "provider";
private final String CATEGORY_BIOME = "biome"; private final String CATEGORY_BIOME = "biome";
@@ -228,13 +230,20 @@ public class DDProperties
config.save(); config.save();
//Unfortunately, there are users out there who have been misconfiguring the worldgen blocks to have IDs above 255. // Unfortunately, there are users out there who have been misconfiguring the worldgen blocks to have IDs above 255.
//This leads to disastrous and cryptic errors in other areas of Minecraft. To prevent headaches, we'll throw // This leads to disastrous and cryptic errors in other areas of Minecraft. To prevent headaches, we'll throw
//an exception here if the blocks have invalid IDs. // an exception here if the blocks have invalid IDs.
if (LimboBlockID > 255 || PermaFabricBlockID > 255) if (LimboBlockID > 255 || PermaFabricBlockID > 255)
{ {
throw new IllegalStateException("World generation blocks MUST have block IDs less than 256. Fix your configuration!"); throw new IllegalStateException("World generation blocks MUST have block IDs less than 256. Fix your configuration!");
} }
// SPECIAL CONFIG SETTINGS
// I'm adding this category because one of our users convinced me, personally, to please allow this.
// These settings are checked _after_ we save the config file, so Forge won't generate them automatically.
// Whoever wants to use them must intentionally write them into the config file.
MonolithTeleportationEnabled = config.get(CATEGORY_SPECIAL, "Enable Monolith Teleportation", true).getBoolean(true);
} }
public static DDProperties initialize(File configFile) public static DDProperties initialize(File configFile)

View File

@@ -193,7 +193,7 @@ public class MobMonolith extends EntityFlying implements IMob
this.soundTime=200; this.soundTime=200;
} }
} }
else if (!this.worldObj.isRemote && !entityPlayer.capabilities.isCreativeMode) else if (!this.worldObj.isRemote && properties.MonolithTeleportationEnabled && !entityPlayer.capabilities.isCreativeMode)
{ {
ChunkCoordinates coords = LimboProvider.getLimboSkySpawn(entityPlayer.worldObj.rand); ChunkCoordinates coords = LimboProvider.getLimboSkySpawn(entityPlayer.worldObj.rand);
Point4D destination = new Point4D((int) (coords.posX+entityPlayer.posX), coords.posY, (int) (coords.posZ+entityPlayer.posZ ), mod_pocketDim.properties.LimboDimensionID); Point4D destination = new Point4D((int) (coords.posX+entityPlayer.posX), coords.posY, (int) (coords.posZ+entityPlayer.posZ ), mod_pocketDim.properties.LimboDimensionID);