From 371b5ce30fa482b4e1d8cbf73632fc37a4084a97 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Wed, 31 Jul 2013 12:24:10 -0400 Subject: [PATCH] Added Exception on Bad Terrain Block IDs DDProperties will now throw an exception that should crash Minecraft if the user tries to use invalid block IDs for worldgen blocks. Should save everyone some suffering. --- StevenDimDoors/mod_pocketDim/DDProperties.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/StevenDimDoors/mod_pocketDim/DDProperties.java b/StevenDimDoors/mod_pocketDim/DDProperties.java index 51b0fb2..243be95 100644 --- a/StevenDimDoors/mod_pocketDim/DDProperties.java +++ b/StevenDimDoors/mod_pocketDim/DDProperties.java @@ -226,6 +226,14 @@ public class DDProperties PocketBiomeID = config.get(CATEGORY_BIOME, "Pocket Biome ID", 250).getInt(); config.save(); + + //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 + //an exception here if the blocks have invalid IDs. + if (LimboBlockID > 255 || PermaFabricBlockID > 255) + { + throw new IllegalStateException("World generation blocks MUST have block IDs less than 256. Fix your configuration!"); + } } public static DDProperties initialize(File configFile)