Add rubber saplings as chest loot.

This commit is contained in:
TheDoctorSoda 2016-02-23 20:24:50 -08:00
parent a14cd2b730
commit 9dacfe3c7b
2 changed files with 19 additions and 0 deletions

View file

@ -92,6 +92,8 @@ public class Core {
ModFluids.init();
// Register ModItems
ModItems.init();
// Registers Chest Loot
ModLoot.init();
//Multiparts
ModParts.init();
// Recipes

View file

@ -0,0 +1,17 @@
package techreborn.init;
import net.minecraft.item.ItemStack;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraftforge.common.ChestGenHooks;
public class ModLoot {
public static WeightedRandomChestContent rubberSaplingLoot = new WeightedRandomChestContent(new ItemStack(ModBlocks.rubberSapling), 1, 3, 50);
public static void init(){
ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(rubberSaplingLoot);
ChestGenHooks.getInfo(ChestGenHooks.BONUS_CHEST).addItem(rubberSaplingLoot);
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(rubberSaplingLoot);
ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem(rubberSaplingLoot);
ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem(rubberSaplingLoot);
}
}