use of gregtech.api.unification.material.properties.ItemPipeProperties in project GregTech by GregTechCEu.
the class ItemBlockItemPipe method addInformation.
@Override
@SideOnly(Side.CLIENT)
public void addInformation(@Nonnull ItemStack stack, @Nullable World worldIn, @Nonnull List<String> tooltip, @Nonnull ITooltipFlag flagIn) {
ItemPipeProperties pipeProperties = blockPipe.createItemProperties(stack);
if (pipeProperties.getTransferRate() % 1 != 0)
tooltip.add(I18n.format("gregtech.item_pipe.rate_items", (int) ((pipeProperties.getTransferRate() * 64) + 0.5)));
else
tooltip.add(I18n.format("gregtech.item_pipe.rate_stacks", (int) pipeProperties.getTransferRate()));
tooltip.add(I18n.format("gregtech.item_pipe.priority", pipeProperties.getPriority()));
if (flagIn.isAdvanced()) {
tooltip.add("MetaItem Id: " + ((BlockMaterialPipe<?, ?, ?>) blockPipe).getPrefix().name + ((BlockMaterialPipe<?, ?, ?>) blockPipe).getItemMaterial(stack).toCamelCaseString());
}
}
Aggregations