Example #1
0
  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);
  }
Example #2
0
 @Override
 public void getSubBlocks(Item itemIn, CreativeTabs tab, List list) {
   for (EnumRockType rocktype : EnumRockType.values()) {
     list.add(ItemStonePot.setRockType(new ItemStack(itemIn), rocktype));
   }
 }
Example #3
0
 @Override
 public String getSubType(ItemStack stack) {
   return ItemStonePot.getRockType(stack).getName();
 }