From 356bd9473ed21913e8793a06c796b853928b27ef Mon Sep 17 00:00:00 2001 From: HoleFish <48403212+HoleFish@users.noreply.github.com> Date: Tue, 30 Jan 2024 02:57:30 +0800 Subject: Add hatch tier tooltips for several ME hatches (#2482) * add hatch tier * correct description --- .../machines/GT_MetaTileEntity_Hatch_CraftingInput_ME.java | 8 ++++++-- .../machines/GT_MetaTileEntity_Hatch_CraftingInput_Slave.java | 11 ++++++++--- .../machines/GT_MetaTileEntity_Hatch_InputBus_ME.java | 3 +++ .../machines/GT_MetaTileEntity_Hatch_Input_ME.java | 3 +++ 4 files changed, 20 insertions(+), 5 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities/machines') 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 940877bf3e..2ec5b8c1c4 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 @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines; +import static gregtech.api.enums.GT_Values.TIER_COLORS; +import static gregtech.api.enums.GT_Values.VN; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_CRAFTING_INPUT_BUFFER; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_CRAFTING_INPUT_BUS; @@ -340,9 +342,11 @@ public class GT_MetaTileEntity_Hatch_CraftingInput_ME extends GT_MetaTileEntity_ aID, aName, aNameRegional, - 6, + supportFluids ? 11 : 6, MAX_INV_COUNT, - new String[] { "Advanced item input for Multiblocks", "Processes patterns directly from ME", + new String[] { "Advanced item input for Multiblocks", + "Hatch Tier: " + TIER_COLORS[supportFluids ? 11 : 6] + VN[supportFluids ? 11 : 6], + "Processes patterns directly from ME", supportFluids ? "It supports patterns including fluids" : "It does not support patterns including fluids", "Change ME connection behavior by right-clicking with wire cutter" }); diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_CraftingInput_Slave.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_CraftingInput_Slave.java index ffbed32445..30a188660b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_CraftingInput_Slave.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_CraftingInput_Slave.java @@ -42,9 +42,9 @@ public class GT_MetaTileEntity_Hatch_CraftingInput_Slave extends GT_MetaTileEnti aNameRegional, 6, 0, - new String[] { "Slave for Crafting Input Buffer", - "Link with Crafting Input Buffer using Data Stick to share inventory", - "Left click on the Crafting Input Buffer, then right click on this block to link them", }); + new String[] { "Slave for Crafting Input Buffer/Bus", + "Link with Crafting Input Buffer/Bus using Data Stick to share inventory", + "Left click on the Crafting Input Buffer/Bus, then right click on this block to link them", }); disableSort = true; } @@ -131,6 +131,11 @@ public class GT_MetaTileEntity_Hatch_CraftingInput_Slave extends GT_MetaTileEnti return master; } + @Override + public byte getTierForStructure() { + return getMaster() == null ? super.getTierForStructure() : getMaster().getTierForStructure(); + } + @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, ItemStack aStack) { 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 f8ffe846d9..9bd0c80e48 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 @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines; +import static gregtech.api.enums.GT_Values.TIER_COLORS; +import static gregtech.api.enums.GT_Values.VN; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_HATCH; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_HATCH_ACTIVE; @@ -767,6 +769,7 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch private static String[] getDescriptionArray(boolean autoPullAvailable) { List strings = new ArrayList<>(8); strings.add("Advanced item input for Multiblocks"); + strings.add("Hatch Tier: " + TIER_COLORS[autoPullAvailable ? 6 : 3] + VN[autoPullAvailable ? 6 : 3]); strings.add("Retrieves directly from ME"); strings.add("Keeps 16 item types in stock"); 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 f60847f8a6..7237cd738f 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,5 +1,7 @@ package gregtech.common.tileentities.machines; +import static gregtech.api.enums.GT_Values.TIER_COLORS; +import static gregtech.api.enums.GT_Values.VN; 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; @@ -846,6 +848,7 @@ public class GT_MetaTileEntity_Hatch_Input_ME extends GT_MetaTileEntity_Hatch_In private static String[] getDescriptionArray(boolean autoPullAvailable) { List strings = new ArrayList<>(8); strings.add("Advanced fluid input for Multiblocks"); + strings.add("Hatch Tier: " + TIER_COLORS[autoPullAvailable ? 10 : 8] + VN[autoPullAvailable ? 10 : 8]); strings.add("Retrieves directly from ME"); strings.add("Keeps 16 fluid types in stock"); -- cgit