diff options
author | Martin Robertz <dream-master@gmx.net> | 2021-10-14 12:28:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-14 12:28:51 +0200 |
commit | 9c30230c5cc1be3d7a213c52b2be85e59ce40cf7 (patch) | |
tree | 6ca27914bab34bf098d5f644cc15ba4733dc0c5a /src/main | |
parent | b205a5f77d60261b8dfe8a1284dac23b1c3cce2a (diff) | |
parent | e1e7c6d1e708fe24767a0a278ffc1324e77e809f (diff) | |
download | GT5-Unofficial-9c30230c5cc1be3d7a213c52b2be85e59ce40cf7.tar.gz GT5-Unofficial-9c30230c5cc1be3d7a213c52b2be85e59ce40cf7.tar.bz2 GT5-Unofficial-9c30230c5cc1be3d7a213c52b2be85e59ce40cf7.zip |
Merge pull request #683 from GTNewHorizons/hatch-indicator
add indicator on hatches
Diffstat (limited to 'src/main')
11 files changed, 41 insertions, 9 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 5266eb246c..777cea09e5 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -337,6 +337,7 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mRenderTileAmbientOcclusion = GregTech_API.sClientDataFile.get("render", "TileAmbientOcclusion", true); gregtechproxy.mRenderGlowTextures = GregTech_API.sClientDataFile.get("render", "GlowTextures", true); gregtechproxy.mRenderFlippedMachinesFlipped = GregTech_API.sClientDataFile.get("render", "RenderFlippedMachinesFlipped", true); + gregtechproxy.mRenderIndicatorsOnHatch = GregTech_API.sClientDataFile.get("render", "RenderIndicatorsOnHatch", true); gregtechproxy.mMaxEqualEntitiesAtOneSpot = tMainConfig.get(aTextGeneral, "MaxEqualEntitiesAtOneSpot", 3).getInt(3); gregtechproxy.mSkeletonsShootGTArrows = tMainConfig.get(aTextGeneral, "SkeletonsShootGTArrows", 16).getInt(16); diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index c4c18b8725..6baa3c260e 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -468,6 +468,10 @@ public class Textures { OVERLAY_PIPE, OVERLAY_PIPE_IN, OVERLAY_PIPE_OUT, + FLUID_OUT_SIGN, + FLUID_IN_SIGN, + ITEM_IN_SIGN, + ITEM_OUT_SIGN, OVERLAY_MUFFLER, OVERLAY_CONTROLLER, diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java index fd7eb0fc94..a0fc7abcc7 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java @@ -1,5 +1,6 @@ package gregtech.api.metatileentity.implementations; +import gregtech.GT_Mod; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; @@ -10,6 +11,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; +import static gregtech.api.enums.Textures.BlockIcons.FLUID_IN_SIGN; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_IN; public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch { @@ -31,12 +33,16 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(FLUID_IN_SIGN)} : + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(FLUID_IN_SIGN)} : + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java index 5a0a2b680f..96667ddb8c 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java @@ -18,7 +18,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_IN; +import static gregtech.api.enums.Textures.BlockIcons.*; public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch { public GT_Recipe_Map mRecipeMap = null; @@ -53,12 +53,16 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN)} : + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN)} : + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java index eb75094a02..0919961af0 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java @@ -1,5 +1,6 @@ package gregtech.api.metatileentity.implementations; +import gregtech.GT_Mod; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; @@ -17,6 +18,7 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.*; +import static gregtech.api.enums.Textures.BlockIcons.FLUID_OUT_SIGN; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { @@ -43,12 +45,16 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(FLUID_OUT_SIGN)} : + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(FLUID_OUT_SIGN)} : + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java index f997f5f489..60832dd4d9 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java @@ -1,5 +1,6 @@ package gregtech.api.metatileentity.implementations; +import gregtech.GT_Mod; import gregtech.api.gui.*; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -12,6 +13,7 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; +import static gregtech.api.enums.Textures.BlockIcons.ITEM_OUT_SIGN; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; @@ -50,12 +52,16 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(ITEM_OUT_SIGN)} : + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(ITEM_OUT_SIGN)} : + new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; } @Override diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 282542c152..ae95184062 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -230,6 +230,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { */ public boolean mRenderFlippedMachinesFlipped = true; + /** + * This enables indicators on input/output hatches + */ + public boolean mRenderIndicatorsOnHatch = true; + public static final int GUI_ID_COVER_SIDE_BASE = 10; // Takes GUI ID 10 - 15 public static Map<String, Integer> oreDictBurnTimes = new HashMap<>(); diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/FLUID_IN_SIGN.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/FLUID_IN_SIGN.png Binary files differnew file mode 100644 index 0000000000..a78a13db69 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/FLUID_IN_SIGN.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/FLUID_OUT_SIGN.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/FLUID_OUT_SIGN.png Binary files differnew file mode 100644 index 0000000000..60aa2fe90a --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/FLUID_OUT_SIGN.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/ITEM_IN_SIGN.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/ITEM_IN_SIGN.png Binary files differnew file mode 100644 index 0000000000..10dd12f753 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/ITEM_IN_SIGN.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/ITEM_OUT_SIGN.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/ITEM_OUT_SIGN.png Binary files differnew file mode 100644 index 0000000000..831650cb28 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/ITEM_OUT_SIGN.png |