Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Keriils committed Sep 20, 2024
1 parent 6105b05 commit 2318e9b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/xir/NHUtilities/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class Config {

// region register massItems key !!!
public static boolean enableGluttonyRingAndHungerRing = true;
public static boolean disableTCBlastFurnace = true;
// endregion

// region TimeVial
Expand Down Expand Up @@ -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");

}

Expand Down

0 comments on commit 2318e9b

Please sign in to comment.