Search in sources :

Example 1 with WireProperties

use of gregtech.api.unification.material.properties.WireProperties in project GregTech by GregTechCEu.

the class ItemBlockCable method addInformation.

@Override
@SideOnly(Side.CLIENT)
public void addInformation(@Nonnull ItemStack stack, @Nullable World worldIn, @Nonnull List<String> tooltip, @Nonnull ITooltipFlag flagIn) {
    WireProperties wireProperties = blockPipe.createItemProperties(stack);
    int tier = GTUtility.getTierByVoltage(wireProperties.getVoltage());
    if (wireProperties.isSuperconductor())
        tooltip.add(I18n.format("gregtech.cable.superconductor", GTValues.VN[tier]));
    tooltip.add(I18n.format("gregtech.cable.voltage", wireProperties.getVoltage(), GTValues.VNF[tier]));
    tooltip.add(I18n.format("gregtech.cable.amperage", wireProperties.getAmperage()));
    tooltip.add(I18n.format("gregtech.cable.loss_per_block", wireProperties.getLossPerBlock()));
    if (flagIn.isAdvanced()) {
        tooltip.add("MetaItem Id: " + ((BlockMaterialPipe<?, ?, ?>) blockPipe).getPrefix().name + ((BlockMaterialPipe<?, ?, ?>) blockPipe).getItemMaterial(stack).toCamelCaseString());
    }
}
Also used : BlockMaterialPipe(gregtech.api.pipenet.block.material.BlockMaterialPipe) ItemBlockMaterialPipe(gregtech.api.pipenet.block.material.ItemBlockMaterialPipe) WireProperties(gregtech.api.unification.material.properties.WireProperties) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

BlockMaterialPipe (gregtech.api.pipenet.block.material.BlockMaterialPipe)1 ItemBlockMaterialPipe (gregtech.api.pipenet.block.material.ItemBlockMaterialPipe)1 WireProperties (gregtech.api.unification.material.properties.WireProperties)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1