package net.minecraft.block; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.Random; import net.minecraft.block.material.Material; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityMobSpawner; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class BlockMobSpawner extends BlockContainer { private static final String __OBFID = "CL_00000269"; protected BlockMobSpawner() { super(Material.rock); } /** * Returns a new instance of a block's tile entity class. Called on placing the block. */ public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityMobSpawner(); } public Item getItemDropped(int meta, Random random, int fortune) { return null; } /** * Returns the quantity of items to drop on block destruction. */ public int quantityDropped(Random random) { return 0; } /** * Drops the block items with a specified chance of dropping the specified items */ public void dropBlockAsItemWithChance(World worldIn, int x, int y, int z, int meta, float chance, int fortune) { super.dropBlockAsItemWithChance(worldIn, x, y, z, meta, chance, fortune); } private Random rand = new Random(); @Override public int getExpDrop(IBlockAccess world, int metadata, int fortune) { return 15 + rand.nextInt(15) + rand.nextInt(15); } public boolean isOpaqueCube() { return false; } /** * Gets an item for the block being called on. Args: world, x, y, z */ @SideOnly(Side.CLIENT) public Item getItem(World worldIn, int x, int y, int z) { return Item.getItemById(0); } }