Search in sources :

Example 6 with ChestGenHooks

use of net.minecraftforge.common.ChestGenHooks in project RFToolsDimensions by McJty.

the class KnownDimletConfiguration method setupChestLoot.

private static void setupChestLoot(String category) {
    List<List<ItemStack>> items = getRandomPartLists();
    ChestGenHooks chest = ChestGenHooks.getInfo(category);
    chest.addItem(new WeightedRandomChestContent(ModItems.dimletParcelItem, 0, 1, 2, WorldgenConfiguration.dimletParcelRarity));
}
Also used : WeightedRandomChestContent(net.minecraft.util.WeightedRandomChestContent) ChestGenHooks(net.minecraftforge.common.ChestGenHooks) EntityList(net.minecraft.entity.EntityList)

Example 7 with ChestGenHooks

use of net.minecraftforge.common.ChestGenHooks in project Minechem by iopleke.

the class MinechemItemsRegistration method addDungeonLoot.

public static void addDungeonLoot() {
    ChestGenHooks ChestProvider = ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST);
    ItemStack A = new ItemStack(blueprint, 1, 0);
    ItemStack B = new ItemStack(blueprint, 1, 1);
    ChestProvider.addItem(new WeightedRandomChestContent(A, 10, 80, 1));
    ChestProvider.addItem(new WeightedRandomChestContent(B, 10, 80, 1));
}
Also used : WeightedRandomChestContent(net.minecraft.util.WeightedRandomChestContent) ChestGenHooks(net.minecraftforge.common.ChestGenHooks) ItemStack(net.minecraft.item.ItemStack)

Aggregations

ChestGenHooks (net.minecraftforge.common.ChestGenHooks)7 ItemStack (net.minecraft.item.ItemStack)3 BlockPos (net.minecraft.util.BlockPos)3 IGalacticraftWorldProvider (micdoodle8.mods.galacticraft.api.world.IGalacticraftWorldProvider)2 TileEntityChest (net.minecraft.tileentity.TileEntityChest)2 WeightedRandomChestContent (net.minecraft.util.WeightedRandomChestContent)2 SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)1 PacketSimple (micdoodle8.mods.galacticraft.core.network.PacketSimple)1 TileEntityTreasureChest (micdoodle8.mods.galacticraft.core.tile.TileEntityTreasureChest)1 TileEntityCrashedProbe (micdoodle8.mods.galacticraft.planets.venus.tile.TileEntityCrashedProbe)1 EntityFrienderman (net.mcft.copy.betterstorage.entity.EntityFrienderman)1 InventoryStacks (net.mcft.copy.betterstorage.inventory.InventoryStacks)1 ItemBackpack (net.mcft.copy.betterstorage.item.ItemBackpack)1 PropertiesBackpack (net.mcft.copy.betterstorage.misc.PropertiesBackpack)1 EntityList (net.minecraft.entity.EntityList)1 EntityLiving (net.minecraft.entity.EntityLiving)1 EntityLivingBase (net.minecraft.entity.EntityLivingBase)1 EntityXPOrb (net.minecraft.entity.item.EntityXPOrb)1 EntityPlayer (net.minecraft.entity.player.EntityPlayer)1 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1