From fba2d98e733d02caef585bed6910894ed5abf375 Mon Sep 17 00:00:00 2001 From: Alexdoru <57050655+Alexdoru@users.noreply.github.com> Date: Tue, 17 Sep 2024 01:40:14 +0200 Subject: remove reflection from GTPPMTECable --- .../metatileentity/implementations/GTPPMTECable.java | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GTPPMTECable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GTPPMTECable.java index 9025dad232..5f6d3762f8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GTPPMTECable.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GTPPMTECable.java @@ -12,23 +12,10 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntityCable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTECable; import gregtech.api.objects.GTRenderedTexture; -import gregtech.api.util.GTUtility; public class GTPPMTECable extends MTECable implements IMetaTileEntityCable { - private static Textures.BlockIcons INSULATION_MEDIUM_PLUS; - - static { - try { - INSULATION_MEDIUM_PLUS = (Textures.BlockIcons) GTUtility - .getField(Textures.BlockIcons.class, "INSULATION_MEDIUM_PLUS") - .get(null); - } catch (IllegalAccessException | NullPointerException e) { - throw new Error(e); - } - } - - private short[] vRGB = null; + private final short[] vRGB; public GTPPMTECable(final int aID, final String aName, final String aNameRegional, final float aThickNess, final Materials aMaterial, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, @@ -134,7 +121,7 @@ public class GTPPMTECable extends MTECable implements IMetaTileEntityCable { return new ITexture[] { new GTRenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GTRenderedTexture( - INSULATION_MEDIUM_PLUS, + Textures.BlockIcons.INSULATION_MEDIUM_PLUS, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.874F) // 0.825 x12 return new ITexture[] { -- cgit