diff options
| author | r4phael <albus.zly@gmail.com> | 2021-01-18 09:13:18 +0800 |
|---|---|---|
| committer | r4phael <albus.zly@gmail.com> | 2021-01-18 09:13:18 +0800 |
| commit | cd3ddba6ec3f1a4a9397a781c40a2e96a8d0b5d3 (patch) | |
| tree | b23ee2c95e3554963e4709ba2b6ef338cadf1f39 /src/main/java/gregtech/common | |
| parent | e00f56ab06e9b3fc14046c8700b0b015eeaf5a3b (diff) | |
| download | GT5-Unofficial-cd3ddba6ec3f1a4a9397a781c40a2e96a8d0b5d3.tar.gz GT5-Unofficial-cd3ddba6ec3f1a4a9397a781c40a2e96a8d0b5d3.tar.bz2 GT5-Unofficial-cd3ddba6ec3f1a4a9397a781c40a2e96a8d0b5d3.zip | |
Remove additional method in IDescribable
Diffstat (limited to 'src/main/java/gregtech/common')
| -rw-r--r-- | src/main/java/gregtech/common/blocks/GT_Item_Machines.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java index 6809f7970d..61879a2253 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java @@ -4,7 +4,9 @@ import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.interfaces.metatileentity.IConnectable; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Frame; @@ -45,7 +47,8 @@ public class GT_Item_Machines extends ItemBlock { IGregTechTileEntity tTileEntity = GregTech_API.METATILEENTITIES[tDamage].getBaseMetaTileEntity(); if (tTileEntity.getDescription() != null) { int i = 0; - String suffix = tTileEntity.isDisplaySecondaryDescription() ? "Secondary_" : ""; + IMetaTileEntity metaTileEntity = tTileEntity.getMetaTileEntity(); + String suffix = (metaTileEntity instanceof MetaTileEntity && ((MetaTileEntity) metaTileEntity).isDisplaySecondaryDescription()) ? "Secondary_" : ""; for (String tDescription : tTileEntity.getDescription()) { if (GT_Utility.isStringValid(tDescription)) { if(tDescription.contains("%%%")){ |
