use of gregtech.api.unification.ore.OrePrefix in project GregTech by GregTechCE.
the class MetaItem1 method addInformation.
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack itemStack, @Nullable World world, List<String> lines, ITooltipFlag tooltipFlag) {
super.addInformation(itemStack, world, lines, tooltipFlag);
int damage = itemStack.getItemDamage();
if (damage < this.metaItemOffset && damage >= 0) {
Material material = Material.MATERIAL_REGISTRY.getObjectById(damage % 1000);
if (material != null) {
OrePrefix prefix = this.orePrefixes[(damage / 1000)];
if (prefix == OrePrefix.dustImpure || prefix == OrePrefix.dustPure) {
lines.add(I18n.format("metaitem.dust.tooltip.purify"));
}
}
}
}
Aggregations