From 2318e9bbc027f944c74d2655dbd4d29582de171c Mon Sep 17 00:00:00 2001 From: DauphalXir Date: Fri, 20 Sep 2024 10:24:06 +0800 Subject: [PATCH] fix --- .../NHUtilities_TC_ElectricBlastFurnace.java | 34 +++++++++++++++++++ .../com/xir/NHUtilities/config/Config.java | 3 ++ 2 files changed, 37 insertions(+) diff --git a/src/main/java/com/xir/NHUtilities/common/machine/multi/NHUtilities_TC_ElectricBlastFurnace.java b/src/main/java/com/xir/NHUtilities/common/machine/multi/NHUtilities_TC_ElectricBlastFurnace.java index 8682c93..7b7aca2 100644 --- a/src/main/java/com/xir/NHUtilities/common/machine/multi/NHUtilities_TC_ElectricBlastFurnace.java +++ b/src/main/java/com/xir/NHUtilities/common/machine/multi/NHUtilities_TC_ElectricBlastFurnace.java @@ -10,6 +10,10 @@ import static gregtech.api.enums.GT_HatchElement.OutputBus; import static gregtech.api.enums.GT_HatchElement.OutputHatch; import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW; import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofCoil; @@ -34,6 +38,7 @@ import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import com.xir.NHUtilities.config.Config; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -185,6 +190,35 @@ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { @Override public ITexture[] getTexture(IGregTechTileEntity baseMetaTileEntity, ForgeDirection side, ForgeDirection aFacing, int colorIndex, boolean aActive, boolean redstoneLevel) { + if (Config.disableTCBlastFurnace) return originalTexture(side, aFacing, aActive); + return tcCustomTexture(side, aFacing, aActive); + } + + private ITexture[] originalTexture(ForgeDirection side, ForgeDirection aFacing, boolean aActive) { + if (side == aFacing) { + if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW) + .extFacing() + .glow() + .build() }; + return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW) + .extFacing() + .glow() + .build() }; + } + return new ITexture[] { casingTexturePages[0][CASING_INDEX] }; + } + + private ITexture[] tcCustomTexture(ForgeDirection side, ForgeDirection aFacing, boolean aActive) { if (side == aFacing) { if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder() .addIcon(Active) diff --git a/src/main/java/com/xir/NHUtilities/config/Config.java b/src/main/java/com/xir/NHUtilities/config/Config.java index ab16d3f..3f5338d 100644 --- a/src/main/java/com/xir/NHUtilities/config/Config.java +++ b/src/main/java/com/xir/NHUtilities/config/Config.java @@ -18,6 +18,7 @@ public class Config { // region register massItems key !!! public static boolean enableGluttonyRingAndHungerRing = true; + public static boolean disableTCBlastFurnace = true; // endregion // region TimeVial @@ -181,6 +182,8 @@ static File minecraftHome() { "disable Super Chest Or Tank Debuff"); disableDollyDebuff = configuration .getBoolean("disableDollyDebuff", CATEGORY_MIXIN_CONFIG, disableDollyDebuff, "disable Dolly Debuff"); + disableTCBlastFurnace = configuration + .getBoolean("disableTCBlastFurnace", CATEGORY_MASS, disableTCBlastFurnace, "disable TC Blast Furnace"); }