Skip to content

Commit 92b8432

Browse files
authored
only draw armor overlay for chestplates (#1564)
1 parent 245a8b1 commit 92b8432

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/main/java/gregtech/api/items/armor/ArmorLogicSuite.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ protected static void addCapacityHUD(ItemStack stack, ArmorUtils.ModularHUD hud)
119119
hud.newString(I18n.format("metaarmor.hud.energy_lvl", String.format("%.1f", energyMultiplier) + "%"));
120120
}
121121

122+
@SideOnly(Side.CLIENT)
123+
@Override
124+
public boolean shouldDrawHUD() {
125+
return this.SLOT == EntityEquipmentSlot.CHEST;
126+
}
127+
122128
public int getEnergyPerUse() {
123129
return this.energyPerUse;
124130
}

src/main/java/gregtech/common/items/armor/NightvisionGoggles.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
import net.minecraft.potion.PotionEffect;
1616
import net.minecraft.util.text.TextComponentTranslation;
1717
import net.minecraft.world.World;
18-
import net.minecraftforge.fml.relauncher.Side;
19-
import net.minecraftforge.fml.relauncher.SideOnly;
2018

2119
import javax.annotation.Nonnull;
2220
import java.util.List;
@@ -98,10 +96,4 @@ public void addInfo(ItemStack itemStack, List<String> lines) {
9896
}
9997
}
10098
}
101-
102-
@SideOnly(Side.CLIENT)
103-
@Override
104-
public boolean shouldDrawHUD() {
105-
return false;
106-
}
10799
}

0 commit comments

Comments
 (0)