diff --git a/MODSRC/vazkii/botania/common/core/handler/ChestGenHandler.java b/MODSRC/vazkii/botania/common/core/handler/ChestGenHandler.java new file mode 100644 index 000000000..aac2a9244 --- /dev/null +++ b/MODSRC/vazkii/botania/common/core/handler/ChestGenHandler.java @@ -0,0 +1,36 @@ +/** + * This class was created by . It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jul 15, 2014, 3:17:00 PM (GMT)] + */ +package vazkii.botania.common.core.handler; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraftforge.common.ChestGenHooks; +import vazkii.botania.common.item.ModItems; + +public final class ChestGenHandler { + + public static void init() { + String c = ChestGenHooks.BONUS_CHEST; + ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.lexicon), 1, 1, 12)); + + c = ChestGenHooks.STRONGHOLD_CORRIDOR; + ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.manaResource, 1, 1), 1, 1, 8)); + ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.manaResource, 1, 1), 1, 3, 2)); + + c = ChestGenHooks.DUNGEON_CHEST; + ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.manaResource, 1, 0), 1, 5, 9)); + ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.lexicon), 1, 1, 6)); + ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.manaBottle), 1, 1, 5)); + } + + +} diff --git a/MODSRC/vazkii/botania/common/core/proxy/CommonProxy.java b/MODSRC/vazkii/botania/common/core/proxy/CommonProxy.java index 5714941e3..369778bdb 100644 --- a/MODSRC/vazkii/botania/common/core/proxy/CommonProxy.java +++ b/MODSRC/vazkii/botania/common/core/proxy/CommonProxy.java @@ -25,6 +25,7 @@ import vazkii.botania.common.block.ModBlocks; import vazkii.botania.common.core.handler.BiomeDecorationHandler; import vazkii.botania.common.core.handler.CommonTickHandler; import vazkii.botania.common.core.handler.ConfigHandler; +import vazkii.botania.common.core.handler.ChestGenHandler; import vazkii.botania.common.core.handler.InternalMethodHandler; import vazkii.botania.common.core.handler.ManaNetworkHandler; import vazkii.botania.common.core.handler.PixieHandler; @@ -68,6 +69,7 @@ public class CommonProxy { ModManaConjurationRecipes.init(); ModManaInfusionRecipes.init(); ModElvenTradeRecipes.init(); + ChestGenHandler.init(); LexiconData.init(); }