@Override public final void getDrops(@Nonnull NonNullList<ItemStack> drops, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull IBlockState state, int fortune) { final T te = getTileEntity(world, pos); final ItemStack drop = getNBTDrop(world, pos, state, fortune, te); if (drop != null) { drops.add(drop); } getExtraDrops(drops, world, pos, state, fortune, te); }
/** * @deprecated override {@link #processPickBlock(IBlockState, RayTraceResult, World, BlockPos, EntityPlayer, ItemStack)} instead if possible */ @Override @Deprecated public @Nonnull ItemStack getPickBlock(@Nonnull IBlockState state, @Nonnull RayTraceResult target, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull EntityPlayer player) { if (player.capabilities.isCreativeMode && GuiScreen.isCtrlKeyDown()) { ItemStack nbtDrop = getNBTDrop(world, pos, state, 0, getTileEntity(world, pos)); if (nbtDrop != null) { return nbtDrop; } } return processPickBlock(state, target, world, pos, player, super.getPickBlock(state, target, world, pos, player)); }