25 lines
716 B
Java
25 lines
716 B
Java
package net.minecraft.world.item;
|
|
|
|
import java.util.List;
|
|
import net.minecraft.network.chat.Component;
|
|
import net.minecraft.world.level.block.Block;
|
|
|
|
public class AirItem extends Item {
|
|
private final Block block;
|
|
|
|
public AirItem(Block block, Item.Properties properties) {
|
|
super(properties);
|
|
this.block = block;
|
|
}
|
|
|
|
@Override
|
|
public String getDescriptionId() {
|
|
return this.block.getDescriptionId();
|
|
}
|
|
|
|
@Override
|
|
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
|
|
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
|
|
this.block.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
|
|
}
|
|
}
|