Java Code Examples for net.minecraftforge.common.ChestGenHooks#addItem()
The following examples show how to use
net.minecraftforge.common.ChestGenHooks#addItem() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BeetrootSeeds.java From Et-Futurum with The Unlicense | 6 votes |
public BeetrootSeeds() { super(ModBlocks.beetroot, Blocks.farmland); setTextureName("beetroot_seeds"); setUnlocalizedName(Utils.getUnlocalisedName("beetroot_seeds")); setCreativeTab(EtFuturum.enableBeetroot ? EtFuturum.creativeTab : null); if (EtFuturum.enableBeetroot) { ChestGenHooks.addItem(ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new ItemStack(this), 1, 2, 5)); ChestGenHooks.addItem(ChestGenHooks.PYRAMID_DESERT_CHEST, new WeightedRandomChestContent(new ItemStack(this), 1, 2, 5)); ChestGenHooks.addItem(ChestGenHooks.PYRAMID_JUNGLE_CHEST, new WeightedRandomChestContent(new ItemStack(this), 1, 2, 5)); ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_CORRIDOR, new WeightedRandomChestContent(new ItemStack(this), 1, 2, 5)); ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_LIBRARY, new WeightedRandomChestContent(new ItemStack(this), 1, 2, 5)); ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_CROSSING, new WeightedRandomChestContent(new ItemStack(this), 1, 2, 5)); ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(this), 1, 2, 5)); } }
Example 2
Source File: GardenContainers.java From GardenCollection with MIT License | 5 votes |
@Mod.EventHandler public void init (FMLInitializationEvent event) { proxy.registerRenderers(); NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); for (int j = 0; j < config.getPatternLocationCount(); j++) ChestGenHooks.addItem(config.getPatternLocation(j), new WeightedRandomChestContent(items.potteryPatternDirty, 0, 1, 1, config.getPatternLocationRarity(j))); VillagerTradeHandler.instance().load(); }