package net.minecraft.item; import java.util.List; import javax.annotation.Nullable; import net.minecraft.block.Block; import net.minecraft.client.util.ITooltipFlag; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class ItemAir extends Item { private final Block block; public ItemAir(Block blockIn) { this.block = blockIn; } /** * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have * different names based on their damage or NBT. */ public String getUnlocalizedName(ItemStack stack) { return this.block.getUnlocalizedName(); } /** * Returns the unlocalized name of this item. */ public String getUnlocalizedName() { return this.block.getUnlocalizedName(); } /** * allows items to add custom lines of information to the mouseover description */ @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) { super.addInformation(stack, worldIn, tooltip, flagIn); this.block.addInformation(stack, worldIn, tooltip, flagIn); } }