From 4ddcc361027a994a93859302322a24c6a303d6cf Mon Sep 17 00:00:00 2001 From: Richard Hendricks Date: Tue, 5 Jun 2018 02:42:27 -0500 Subject: Added option for disabling machinemetal tinting. --- src/main/java/gregtech/common/blocks/GT_Block_Casings1.java | 7 ++++++- src/main/java/gregtech/common/blocks/GT_Block_Casings2.java | 9 +++++++-- src/main/java/gregtech/common/blocks/GT_Block_Casings6.java | 7 ++++++- .../machines/multi/GT_MetaTileEntity_PyrolyseOven.java | 2 +- 4 files changed, 20 insertions(+), 5 deletions(-) (limited to 'src/main/java/gregtech/common') diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java index 77668caaaa..0e422c5521 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java @@ -1,5 +1,6 @@ package gregtech.common.blocks; +import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.objects.GT_CopiedBlockTexture; @@ -94,6 +95,10 @@ public class GT_Block_Casings1 } public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { - return aWorld.getBlockMetadata(aX, aY, aZ) > 9 ? super.colorMultiplier(aWorld, aX, aY, aZ) : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + if (GregTech_API.sUseMachineMetal) { + return aWorld.getBlockMetadata(aX, aY, aZ) > 9 ? super.colorMultiplier(aWorld, aX, aY, aZ) : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + } else { + return aWorld.getBlockMetadata(aX, aY, aZ) > 9 ? super.colorMultiplier(aWorld, aX, aY, aZ) : gregtech.api.enums.Dyes.dyeWhite.mRGBa[0] << 16 | gregtech.api.enums.Dyes.dyeWhite.mRGBa[1] << 8 | gregtech.api.enums.Dyes.dyeWhite.mRGBa[2]; + } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java index f8f54f9604..cc14d42f37 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java @@ -1,5 +1,6 @@ package gregtech.common.blocks; +import gregtech.api.GregTech_API; import gregtech.api.enums.Dyes; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; @@ -56,8 +57,12 @@ public class GT_Block_Casings2 ItemList.Casing_Pipe_TungstenSteel.set(new ItemStack(this, 1, 15)); //Special handler for Pyrolyse Oven Casing - Textures.BlockIcons.CASING_BLOCKS[22] = new GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0,Dyes.MACHINE_METAL.mRGBa); - } + if (GregTech_API.sUseMachineMetal) { + Textures.BlockIcons.CASING_BLOCKS[22] = new GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0,Dyes.MACHINE_METAL.mRGBa); + } else { + Textures.BlockIcons.CASING_BLOCKS[22] = new GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0,Dyes.dyeWhite.mRGBa); + } +} public IIcon getIcon(int aSide, int aMeta) { switch (aMeta) { diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java index 2cba79d6e3..61493a2490 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java @@ -2,6 +2,7 @@ package gregtech.common.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.objects.GT_CopiedBlockTexture; @@ -98,6 +99,10 @@ public class GT_Block_Casings6 } public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { - return gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + if(GregTech_API.sUseMachineMetal) { + return gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + } else { + return gregtech.api.enums.Dyes.dyeWhite.mRGBa[0] << 16 | gregtech.api.enums.Dyes.dyeWhite.mRGBa[1] << 8 | gregtech.api.enums.Dyes.dyeWhite.mRGBa[2]; + } } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java index 1170358e32..7d9397f954 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java @@ -29,7 +29,7 @@ import java.util.Arrays; public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlockBase { private int coilMetaID; - public static GT_CopiedBlockTexture mTextureULV = new GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0,Dyes.MACHINE_METAL.mRGBa); + public static GT_CopiedBlockTexture mTextureULV = new GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0,(GregTech_API.sUseMachineMetal)? Dyes.MACHINE_METAL.mRGBa : Dyes.dyeWhite.mRGBa); //private final int CASING_INDEX = 22; -- cgit