From 057bc6b0809d9a98dd521bac721cf05e7290e22e Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Wed, 8 Jan 2025 19:06:21 -0600 Subject: [PATCH 1/2] Retier CRIB, proxy, adv stocking hatch --- .../tileentities/machines/MTEHatchCraftingInputME.java | 4 ++-- .../tileentities/machines/MTEHatchCraftingInputSlave.java | 6 ++++-- .../common/tileentities/machines/MTEHatchInputME.java | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/MTEHatchCraftingInputME.java b/src/main/java/gregtech/common/tileentities/machines/MTEHatchCraftingInputME.java index cb57fb85db6..2b9bcf826bb 100644 --- a/src/main/java/gregtech/common/tileentities/machines/MTEHatchCraftingInputME.java +++ b/src/main/java/gregtech/common/tileentities/machines/MTEHatchCraftingInputME.java @@ -345,10 +345,10 @@ public MTEHatchCraftingInputME(int aID, String aName, String aNameRegional, bool aID, aName, aNameRegional, - supportFluids ? 11 : 6, + supportFluids ? 10 : 6, MAX_INV_COUNT, new String[] { "Advanced item input for Multiblocks", - "Hatch Tier: " + TIER_COLORS[supportFluids ? 11 : 6] + VN[supportFluids ? 11 : 6], + "Hatch Tier: " + TIER_COLORS[supportFluids ? 10 : 6] + VN[supportFluids ? 10 : 6], "Processes patterns directly from ME", supportFluids ? "It supports patterns including fluids" : "It does not support patterns including fluids", diff --git a/src/main/java/gregtech/common/tileentities/machines/MTEHatchCraftingInputSlave.java b/src/main/java/gregtech/common/tileentities/machines/MTEHatchCraftingInputSlave.java index 35db434a32a..05b4b7953fd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/MTEHatchCraftingInputSlave.java +++ b/src/main/java/gregtech/common/tileentities/machines/MTEHatchCraftingInputSlave.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines; +import static gregtech.api.enums.GTValues.TIER_COLORS; +import static gregtech.api.enums.GTValues.VN; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_CRAFTING_INPUT_SLAVE; import java.util.ArrayList; @@ -41,9 +43,9 @@ public MTEHatchCraftingInputSlave(int aID, String aName, String aNameRegional) { aID, aName, aNameRegional, - 6, + 11, 0, - new String[] { "Proxy for Crafting Input Buffer/Bus", + new String[] { "Proxy for Crafting Input Buffer/Bus", "Hatch Tier: " + TIER_COLORS[11] + VN[11], "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; diff --git a/src/main/java/gregtech/common/tileentities/machines/MTEHatchInputME.java b/src/main/java/gregtech/common/tileentities/machines/MTEHatchInputME.java index 5fc0156c851..5e7fd23d95e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/MTEHatchInputME.java +++ b/src/main/java/gregtech/common/tileentities/machines/MTEHatchInputME.java @@ -117,7 +117,7 @@ public class MTEHatchInputME extends MTEHatchInput implements IPowerChannelState protected static final FluidStack[] EMPTY_FLUID_STACK = new FluidStack[0]; public MTEHatchInputME(int aID, boolean autoPullAvailable, String aName, String aNameRegional) { - super(aID, aName, aNameRegional, autoPullAvailable ? 10 : 8, 1, getDescriptionArray(autoPullAvailable)); + super(aID, aName, aNameRegional, autoPullAvailable ? 9 : 8, 1, getDescriptionArray(autoPullAvailable)); this.autoPullAvailable = autoPullAvailable; } @@ -929,7 +929,7 @@ public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompou 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("Hatch Tier: " + TIER_COLORS[autoPullAvailable ? 9 : 8] + VN[autoPullAvailable ? 9 : 8]); strings.add("Retrieves directly from ME"); strings.add("Keeps 16 fluid types in stock"); From f052b2c94911ccf414cb9c31e305fb0561a08f91 Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Thu, 9 Jan 2025 00:26:36 -0600 Subject: [PATCH 2/2] remove compact fusion fluid hatch tier restriction --- .../tileEntity/MTELargeFusionComputer1.java | 4 +-- .../tileEntity/MTELargeFusionComputer2.java | 4 +-- .../tileEntity/MTELargeFusionComputer3.java | 4 +-- .../tileEntity/MTELargeFusionComputer4.java | 4 +-- .../tileEntity/MTELargeFusionComputer5.java | 4 +-- .../base/MTELargeFusionComputer.java | 33 +++---------------- 6 files changed, 14 insertions(+), 39 deletions(-) diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer1.java b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer1.java index 0d36a897aec..cde9519e351 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer1.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer1.java @@ -72,7 +72,7 @@ protected MultiblockTooltipBuilder createTooltip() { .addOutputHatch("1-16, Hint block with dot 1", 1) .addStructureInfo("Supports Crafting Input Buffer") .addStructureInfo( - "ALL Hatches must be " + GTUtility.getColoredTierNameFromTier((byte) hatchTier()) + "Energy Hatches must be " + GTUtility.getColoredTierNameFromTier((byte) energyHatchTier()) + EnumChatFormatting.GRAY + " or better") .toolTipFinisher(); @@ -120,7 +120,7 @@ public int getGlassMeta() { } @Override - public int hatchTier() { + public int energyHatchTier() { return 6; } diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer2.java b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer2.java index 472af5e84e2..44af8fb18dd 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer2.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer2.java @@ -73,7 +73,7 @@ protected MultiblockTooltipBuilder createTooltip() { .addOutputHatch("1-16, Hint block with dot 1", 1) .addStructureInfo("Supports Crafting Input Buffer") .addStructureInfo( - "ALL Hatches must be " + GTUtility.getColoredTierNameFromTier((byte) hatchTier()) + "Energy Hatches must be " + GTUtility.getColoredTierNameFromTier((byte) energyHatchTier()) + EnumChatFormatting.GRAY + " or better") .toolTipFinisher(); @@ -121,7 +121,7 @@ public int getGlassMeta() { } @Override - public int hatchTier() { + public int energyHatchTier() { return 7; } diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer3.java b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer3.java index f1e46b2c6f9..6e89cf067ff 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer3.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer3.java @@ -74,7 +74,7 @@ protected MultiblockTooltipBuilder createTooltip() { .addOutputHatch("1-16, Hint block with dot 1", 1) .addStructureInfo("Supports Crafting Input Buffer") .addStructureInfo( - "ALL Hatches must be " + GTUtility.getColoredTierNameFromTier((byte) hatchTier()) + "Energy Hatches must be " + GTUtility.getColoredTierNameFromTier((byte) energyHatchTier()) + EnumChatFormatting.GRAY + " or better") .toolTipFinisher(); @@ -122,7 +122,7 @@ public int getGlassMeta() { } @Override - public int hatchTier() { + public int energyHatchTier() { return 8; } diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer4.java b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer4.java index a54348f19ac..bff630a06ea 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer4.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer4.java @@ -73,7 +73,7 @@ protected MultiblockTooltipBuilder createTooltip() { .addOutputHatch("1-16, Hint block with dot 1", 1) .addStructureInfo("Supports Crafting Input Buffer") .addStructureInfo( - "ALL Hatches must be " + GTUtility.getColoredTierNameFromTier((byte) hatchTier()) + "Energy Hatches must be " + GTUtility.getColoredTierNameFromTier((byte) energyHatchTier()) + EnumChatFormatting.GRAY + " or better") .toolTipFinisher(); @@ -121,7 +121,7 @@ public int getGlassMeta() { } @Override - public int hatchTier() { + public int energyHatchTier() { return 9; } diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer5.java b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer5.java index fd652356f95..e382dc99a9b 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer5.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer5.java @@ -74,7 +74,7 @@ protected MultiblockTooltipBuilder createTooltip() { .addOutputHatch("1-16, Hint block with dot 1", 1) .addStructureInfo("Supports Crafting Input Buffer") .addStructureInfo( - "ALL Hatches must be " + GTUtility.getColoredTierNameFromTier((byte) hatchTier()) + "Energy Hatches must be " + GTUtility.getColoredTierNameFromTier((byte) energyHatchTier()) + EnumChatFormatting.GRAY + " or better") .toolTipFinisher(); @@ -122,7 +122,7 @@ public int getGlassMeta() { } @Override - public int hatchTier() { + public int energyHatchTier() { return 10; } diff --git a/src/main/java/goodgenerator/blocks/tileEntity/base/MTELargeFusionComputer.java b/src/main/java/goodgenerator/blocks/tileEntity/base/MTELargeFusionComputer.java index c6c54e448a8..5c1a49e58f0 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/base/MTELargeFusionComputer.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/base/MTELargeFusionComputer.java @@ -105,10 +105,8 @@ protected IStructureDefinition computeValue(Class typ .atLeast( gregtech.api.enums.HatchElement.InputHatch.or(gregtech.api.enums.HatchElement.InputBus), gregtech.api.enums.HatchElement.OutputHatch) - .adder(MTELargeFusionComputer::addFluidIO) .casingIndex(x.textureIndex()) .dot(1) - .hatchItemFilterAnd(x2 -> filterByMTETier(x2.hatchTier(), Integer.MAX_VALUE)) .buildAndChain(x.getGlassBlock(), x.getGlassMeta()))) .addElement( 'E', @@ -119,7 +117,7 @@ protected IStructureDefinition computeValue(Class typ .or(gregtech.api.enums.HatchElement.Energy)) .adder(MTELargeFusionComputer::addEnergyInjector) .casingIndex(x.textureIndex()) - .hatchItemFilterAnd(x2 -> filterByMTETier(x2.hatchTier(), Integer.MAX_VALUE)) + .hatchItemFilterAnd(x2 -> filterByMTETier(x2.energyHatchTier(), Integer.MAX_VALUE)) .dot(2) .buildAndChain(x.getCasingBlock(), x.getCasingMeta()))) .addElement('F', lazy(x -> ofFrame(x.getFrameBox()))) @@ -197,7 +195,7 @@ public long maxEUStore() { public abstract int getGlassMeta(); - public abstract int hatchTier(); + public abstract int energyHatchTier(); public abstract Materials getFrameBox(); @@ -485,40 +483,17 @@ private boolean addEnergyInjector(IGregTechTileEntity aBaseMetaTileEntity, int a IMetaTileEntity aMetaTileEntity = aBaseMetaTileEntity.getMetaTileEntity(); if (aMetaTileEntity == null) return false; if (aMetaTileEntity instanceof MTEHatchEnergy tHatch) { - if (tHatch.getTierForStructure() < hatchTier()) return false; + if (tHatch.getTierForStructure() < energyHatchTier()) return false; tHatch.updateTexture(aBaseCasingIndex); return mEnergyHatches.add(tHatch); } else if (aMetaTileEntity instanceof MTEHatchEnergyMulti tHatch) { - if (tHatch.getTierForStructure() < hatchTier()) return false; + if (tHatch.getTierForStructure() < energyHatchTier()) return false; tHatch.updateTexture(aBaseCasingIndex); return eEnergyMulti.add(tHatch); } return false; } - private boolean addFluidIO(IGregTechTileEntity aBaseMetaTileEntity, int aBaseCasingIndex) { - IMetaTileEntity aMetaTileEntity = aBaseMetaTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) return false; - if (aMetaTileEntity instanceof MTEHatch hatch) { - hatch.updateTexture(aBaseCasingIndex); - hatch.updateCraftingIcon(this.getMachineCraftingIcon()); - } - if (aMetaTileEntity instanceof MTEHatchInput tInput) { - if (tInput.getTierForStructure() < hatchTier()) return false; - tInput.mRecipeMap = getRecipeMap(); - return mInputHatches.add(tInput); - } - if (aMetaTileEntity instanceof MTEHatchOutput tOutput) { - if (tOutput.getTierForStructure() < hatchTier()) return false; - return mOutputHatches.add(tOutput); - } - if (aMetaTileEntity instanceof IDualInputHatch tInput) { - tInput.updateCraftingIcon(this.getMachineCraftingIcon()); - return mDualInputHatches.add(tInput); - } - return false; - } - private boolean addDroneHatch(IGregTechTileEntity aBaseMetaTileEntity, int aBaseCasingIndex) { if (aBaseMetaTileEntity == null) return false; IMetaTileEntity aMetaTileEntity = aBaseMetaTileEntity.getMetaTileEntity();