public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TEStonePot) { InventoryHelper.dropInventoryItems(worldIn, pos, (TEStonePot) tileentity); spawnAsEntity( worldIn, pos, ItemStonePot.setRockType( new ItemStack(BlocksVC.stonepot), ((TEStonePot) tileentity).rocktype)); } super.breakBlock(worldIn, pos, state); }
@Override public void getSubBlocks(Item itemIn, CreativeTabs tab, List list) { for (EnumRockType rocktype : EnumRockType.values()) { list.add(ItemStonePot.setRockType(new ItemStack(itemIn), rocktype)); } }
@Override public String getSubType(ItemStack stack) { return ItemStonePot.getRockType(stack).getName(); }