コード例 #1
0
 @Override
 public final ItemStack getPickBlock(
     MovingObjectPosition target, World world, int x, int y, int z) {
   int meta = world.getBlockMetadata(target.blockX, target.blockY, target.blockZ);
   ChromaTiles m = ChromaTiles.getTileFromIDandMetadata(this, meta);
   ItemStack is =
       this.getHarvestedItemStack(world, target.blockX, target.blockY, target.blockZ, meta, m);
   NBTTagCompound nbt = new NBTTagCompound();
   ((TileEntityAdjacencyUpgrade) world.getTileEntity(target.blockX, target.blockY, target.blockZ))
       .getTagsToWriteToStack(nbt);
   is.stackTagCompound = nbt.hasNoTags() ? null : (NBTTagCompound) nbt.copy();
   return is;
 }