From f131a3b34562d3be0c65e046be73eeea5570b1db Mon Sep 17 00:00:00 2001 From: Maxim Date: Wed, 29 Mar 2023 20:32:45 +0200 Subject: Various NA fixes (#151) * Remove logic to ignore stacks * Updated tooltip * Made structure definition static --- .../blocks/tileEntity/NeutronActivator.java | 41 ++++------------------ 1 file changed, 7 insertions(+), 34 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/goodgenerator/blocks/tileEntity/NeutronActivator.java b/src/main/java/goodgenerator/blocks/tileEntity/NeutronActivator.java index 07c1028706..40b2af3926 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/NeutronActivator.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/NeutronActivator.java @@ -54,7 +54,7 @@ import gregtech.api.util.*; public class NeutronActivator extends GT_MetaTileEntity_TooltipMultiBlockBase_EM implements IConstructable, ISurvivalConstructable { - protected IStructureDefinition multiDefinition = null; + protected static IStructureDefinition multiDefinition = null; protected final ArrayList mNeutronAccelerator = new ArrayList<>(); protected final ArrayList mNeutronSensor = new ArrayList<>(); protected int casingAmount = 0; @@ -87,38 +87,8 @@ public class NeutronActivator extends GT_MetaTileEntity_TooltipMultiBlockBase_EM public boolean checkRecipe_EM(ItemStack aStack) { this.mEfficiency = 10000; - ArrayList tFluids = getStoredFluids(); - ArrayList tItems = getStoredInputs(); - Collection tRecipes = MyRecipeAdder.instance.NA.mRecipeList; - - for (int i = 0; i < tFluids.size() - 1; i++) { - for (int j = i + 1; j < tFluids.size(); j++) { - if (GT_Utility.areFluidsEqual(tFluids.get(i), tFluids.get(j))) { - if ((tFluids.get(i)).amount >= (tFluids.get(j)).amount) { - tFluids.remove(j--); - } else { - tFluids.remove(i--); - break; - } - } - } - } - - for (int i = 0; i < tItems.size() - 1; i++) { - for (int j = i + 1; j < tItems.size(); j++) { - if (GT_Utility.areStacksEqual(tItems.get(i), tItems.get(j))) { - if ((tItems.get(i)).stackSize >= (tItems.get(j)).stackSize) { - tItems.remove(j--); - } else { - tItems.remove(i--); - break; - } - } - } - } - - FluidStack[] inFluids = tFluids.toArray(new FluidStack[0]); - ItemStack[] inItems = tItems.toArray(new ItemStack[0]); + FluidStack[] inFluids = getStoredFluids().toArray(new FluidStack[0]); + ItemStack[] inItems = getStoredInputs().toArray(new ItemStack[0]); int minNKE, maxNKE; lastRecipe = getRecipeMap() @@ -228,7 +198,10 @@ public class NeutronActivator extends GT_MetaTileEntity_TooltipMultiBlockBase_EM .addOutputBus("Hint block with dot 2").addMaintenanceHatch("Hint block with dot 2") .addOtherStructurePart("Neutron Accelerator", "Hint block with dot 2") .addOtherStructurePart("Neutron Sensor", "Hint block with dot 2") - .addCasingInfo("Clean Stainless Steel Machine Casing", 7).toolTipFinisher("Good Generator"); + .addCasingInfoRange("Clean Stainless Steel Machine Casing", 7, 31, false) + .addCasingInfoExactly("Processor Machine Casing", 18, false) + .addCasingInfoMin("Steel Frame Box", 16, false).addCasingInfoMin("Speeding Pipe Casing", 4, false) + .addCasingInfoMin("EV+ Glass", 32, false).toolTipFinisher("Good Generator"); return tt; } -- cgit