diff --git a/src/main/java/emt/util/EMTConfigHandler.java b/src/main/java/emt/util/EMTConfigHandler.java index 74c4c34..9cc8850 100644 --- a/src/main/java/emt/util/EMTConfigHandler.java +++ b/src/main/java/emt/util/EMTConfigHandler.java @@ -20,6 +20,10 @@ public class EMTConfigHandler { public static final String RESEARCH = "Research"; public static final String VALUES = "Numeric Values"; public static final String OUTPUTS = "Essentia Generator Outputs"; + + private static final String IGNORED_UNDER_GTNH = "Ignored when GTNH (dreamcraft) is installed: " + + "dungeon loot is controlled by config/TooMuchLoot/loot/dungeonChest.xml in GTNH."; + public static Configuration config; public static int etherealProcessorBaseSpeed; public static int etherealProcessorBonus; @@ -187,19 +191,25 @@ public class EMTConfigHandler { "Disable smoke effect for boots", false, "This effect only appears when the player isn't on the ground").getBoolean(smoke); - oneRingSpawn = config - .get(RANDOM, "Disable One Ring in dungeon chests", true, "There is a recipe to get this item.") - .getBoolean(oneRingSpawn); + oneRingSpawn = config.get( + RANDOM, + "Disable One Ring in dungeon chests", + true, + "There is a recipe to get this item. " + IGNORED_UNDER_GTNH).getBoolean(oneRingSpawn); chanceTaintedMjolnir = config.get( RANDOM, "Tainted Mjolnir spawning change", 25, - "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); + "If you have a lot of mods adding dungeon loot, you should definetely increase this. " + + IGNORED_UNDER_GTNH) + .getInt(); chanceOneRing = config.get( RANDOM, "One Ring spawning chance", 15, - "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); + "If you have a lot of mods adding dungeon loot, you should definetely increase this. " + + IGNORED_UNDER_GTNH) + .getInt(); removeAmberAndCinnabarMacerating = config .get( RANDOM, diff --git a/src/main/java/emt/util/EMTDungeonChestGenerator.java b/src/main/java/emt/util/EMTDungeonChestGenerator.java index 12e52f8..1942ef7 100644 --- a/src/main/java/emt/util/EMTDungeonChestGenerator.java +++ b/src/main/java/emt/util/EMTDungeonChestGenerator.java @@ -4,11 +4,17 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandomChestContent; import net.minecraftforge.common.ChestGenHooks; +import cpw.mods.fml.common.Loader; import emt.init.EMTItems; public class EMTDungeonChestGenerator { public static void generateLoot() { + // GTNH replaces the whole dungeonChest table from config/TooMuchLoot/loot/dungeonChest.xml at + // FMLServerStartingEvent, which discards everything registered here. Edit that file instead. + if (Loader.isModLoaded("dreamcraft")) { + return; + } if (!EMTConfigHandler.thorHammerResearch) { ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem( new WeightedRandomChestContent(