diff options
author | tth05 <36999320+tth05@users.noreply.github.com> | 2023-10-24 18:56:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-24 18:56:44 +0200 |
commit | bbf92ef9615966f11ca747a787c227226adf2b85 (patch) | |
tree | 224c7e68333a3643fd949168f97e6538a1284cc5 /src | |
parent | 04c1248281f3c067e2ba4a979e7d363704b06663 (diff) | |
download | GT5-Unofficial-bbf92ef9615966f11ca747a787c227226adf2b85.tar.gz GT5-Unofficial-bbf92ef9615966f11ca747a787c227226adf2b85.tar.bz2 GT5-Unofficial-bbf92ef9615966f11ca747a787c227226adf2b85.zip |
New base and active textures for stocking input bus/hatch and ME output bus/hatch (#2339)
* Periodically update active state of ME hatches
* Use HV casing textures for ME hatches
* Add new textures for stocking input bus/hatch and me output bus/hatch
---------
Co-authored-by: Pelotrio <45769595+Pelotrio@users.noreply.github.com>
Diffstat (limited to 'src')
14 files changed, 39 insertions, 22 deletions
diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index cbc1ffc576..e497eb48af 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -1216,8 +1216,6 @@ public class Textures { PIPE_RESTRICTOR_DR, PIPE_RESTRICTOR_LR, - OVERLAY_ME_HATCH, - LARGETURBINE_ST_EMPTY1, LARGETURBINE_ST_EMPTY2, LARGETURBINE_ST_EMPTY3, @@ -1288,12 +1286,15 @@ public class Textures { LARGETURBINE_ADVGAS_EMPTY8, LARGETURBINE_ADVGAS_EMPTY9, + OVERLAY_ME_HATCH, OVERLAY_ME_HATCH_ACTIVE, OVERLAY_ME_INPUT_HATCH, + OVERLAY_ME_INPUT_HATCH_ACTIVE, + OVERLAY_ME_INPUT_FLUID_HATCH, + OVERLAY_ME_INPUT_FLUID_HATCH_ACTIVE, OVERLAY_ME_CRAFTING_INPUT_BUFFER, OVERLAY_ME_CRAFTING_INPUT_BUS, OVERLAY_ME_CRAFTING_INPUT_SLAVE, - OVERLAY_ME_INPUT_HATCH_ACTIVE, OVERLAY_ME_CRAFTING_HATCH, OVERLAY_ME_CRAFTING_HATCH_ACTIVE, OVERLAY_ME_FLUID_HATCH, diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_CraftingInput_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_CraftingInput_ME.java index 54c654a70a..3232078353 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_CraftingInput_ME.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_CraftingInput_ME.java @@ -380,8 +380,13 @@ public class GT_MetaTileEntity_Hatch_CraftingInput_ME extends GT_MetaTileEntity_ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { super.onPostTick(aBaseMetaTileEntity, aTimer); - if (needPatternSync && aTimer % 10 == 0 && getBaseMetaTileEntity().isServerSide()) { - needPatternSync = !postMEPatternChange(); + if (getBaseMetaTileEntity().isServerSide()) { + if (needPatternSync && aTimer % 10 == 0) { + needPatternSync = !postMEPatternChange(); + } + if (aTimer % 20 == 0) { + getBaseMetaTileEntity().setActive(isActive()); + } } } diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java index 2bdcb2e42c..a23916dcc8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java @@ -92,7 +92,7 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch aID, aName, aNameRegional, - 1, + 3, SLOT_COUNT * 2 + 2, new String[] { "Advanced item input for Multiblocks", "Retrieves directly from ME", "Keeps 16 item types in stock", @@ -127,8 +127,13 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aTimer % 100 == 0 && autoPullItemList) { - refreshItemList(); + if (getBaseMetaTileEntity().isServerSide()) { + if (aTimer % 100 == 0 && autoPullItemList) { + refreshItemList(); + } + if (aTimer % 20 == 0) { + getBaseMetaTileEntity().setActive(isActive()); + } } super.onPostTick(aBaseMetaTileEntity, aTimer); } diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Input_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Input_ME.java index 7c2ae6b175..55718456f2 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Input_ME.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Input_ME.java @@ -1,7 +1,7 @@ package gregtech.common.tileentities.machines; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_FLUID_HATCH; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_FLUID_HATCH_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_FLUID_HATCH; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_FLUID_HATCH_ACTIVE; import java.util.Arrays; import java.util.EnumSet; @@ -107,7 +107,7 @@ public class GT_MetaTileEntity_Hatch_Input_ME extends GT_MetaTileEntity_Hatch_In aID, aName, aNameRegional, - 1, + 3, 1, new String[] { "Advanced fluid input for Multiblocks", "Retrieves directly from ME", "Keeps 16 fluid types in stock", @@ -129,18 +129,23 @@ public class GT_MetaTileEntity_Hatch_Input_ME extends GT_MetaTileEntity_Hatch_In @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_FLUID_HATCH_ACTIVE) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_INPUT_FLUID_HATCH_ACTIVE) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_FLUID_HATCH) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_INPUT_FLUID_HATCH) }; } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aTimer % 100 == 0 && autoPullFluidList) { - refreshFluidList(); + if (getBaseMetaTileEntity().isServerSide()) { + if (aTimer % 100 == 0 && autoPullFluidList) { + refreshFluidList(); + } + if (aTimer % 20 == 0) { + getBaseMetaTileEntity().setActive(isActive()); + } } super.onPostTick(aBaseMetaTileEntity, aTimer); } diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java index dd81bcc818..16817e1a9c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java @@ -35,7 +35,6 @@ import appeng.util.IWideReadableNumberConverter; import appeng.util.Platform; import appeng.util.ReadableNumberConverter; import gregtech.GT_Mod; -import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -63,7 +62,7 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc aID, aName, aNameRegional, - 1, + 3, new String[] { "Item Output for Multiblocks", "Stores directly into ME", "Can cache infinite amount of items.", "Change cache behavior by right-clicking with screwdriver.", "Change ME connection behavior by right-clicking with wire cutter" }, @@ -220,9 +219,10 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (GT_Values.GT.isServerSide()) { + if (getBaseMetaTileEntity().isServerSide()) { tickCounter = aTick; if (tickCounter > (lastOutputTick + 40)) flushCachedStack(); + if (tickCounter % 20 == 0) getBaseMetaTileEntity().setActive(isActive()); } super.onPostTick(aBaseMetaTileEntity, aTick); } diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java index f17e9818c4..4df8ff68c5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java @@ -67,7 +67,7 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O aID, aName, aNameRegional, - 1, + 3, new String[] { "Fluid Output for Multiblocks", "Stores directly into ME", "Can cache infinite amount of fluids.", "Change cache behavior by right-clicking with screwdriver.", "Change ME connection behavior by right-clicking with wire cutter" }, @@ -85,12 +85,12 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_FLUID_HATCH) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_FLUID_HATCH_ACTIVE) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_FLUID_HATCH_ACTIVE) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_FLUID_HATCH) }; } @Override @@ -244,9 +244,10 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (GT_Values.GT.isServerSide()) { + if (getBaseMetaTileEntity().isServerSide()) { tickCounter = aTick; if (tickCounter > (lastOutputTick + 40)) flushCachedStack(); + if (tickCounter % 20 == 0) getBaseMetaTileEntity().setActive(isActive()); } super.onPostTick(aBaseMetaTileEntity, aTick); } diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_FLUID_HATCH.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_FLUID_HATCH.png Binary files differindex 3c30b7580c..e13a7f0fb7 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_FLUID_HATCH.png +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_FLUID_HATCH.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_FLUID_HATCH_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_FLUID_HATCH_ACTIVE.png Binary files differindex 3c30b7580c..de4b210051 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_FLUID_HATCH_ACTIVE.png +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_FLUID_HATCH_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_HATCH.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_HATCH.png Binary files differindex 5c8ca75a22..8914379ca0 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_HATCH.png +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_HATCH.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_HATCH_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_HATCH_ACTIVE.png Binary files differindex e9deea5dcf..39de0bb51b 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_HATCH_ACTIVE.png +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_HATCH_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_FLUID_HATCH.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_FLUID_HATCH.png Binary files differnew file mode 100644 index 0000000000..a2644c44b4 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_FLUID_HATCH.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_FLUID_HATCH_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_FLUID_HATCH_ACTIVE.png Binary files differnew file mode 100644 index 0000000000..fd4570e0f9 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_FLUID_HATCH_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_HATCH.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_HATCH.png Binary files differindex 5c8ca75a22..dd3d1f1203 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_HATCH.png +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_HATCH.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_HATCH_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_HATCH_ACTIVE.png Binary files differindex 5c8ca75a22..c9bb59b3b4 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_HATCH_ACTIVE.png +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ME_INPUT_HATCH_ACTIVE.png |