diff options
author | Maxim <maxim235@gmx.de> | 2023-07-14 12:54:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-14 12:54:49 +0200 |
commit | b8bd619bbfdecddccf8a1a3129a11e0fccca200b (patch) | |
tree | c38967470d94d954a4ac126009c7e4462bbc6700 /src/main/java/gregtech/api/logic | |
parent | 4dd7f2f9494880712c15fd66637d0e96004e40a6 (diff) | |
download | GT5-Unofficial-b8bd619bbfdecddccf8a1a3129a11e0fccca200b.tar.gz GT5-Unofficial-b8bd619bbfdecddccf8a1a3129a11e0fccca200b.tar.bz2 GT5-Unofficial-b8bd619bbfdecddccf8a1a3129a11e0fccca200b.zip |
GPL Special Item access (#2134)
* Added getters to allow a machine to set the special item for recipe checking
Diffstat (limited to 'src/main/java/gregtech/api/logic')
-rw-r--r-- | src/main/java/gregtech/api/logic/ProcessingLogic.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main/java/gregtech/api/logic/ProcessingLogic.java b/src/main/java/gregtech/api/logic/ProcessingLogic.java index db97ac151f..bcf460e5e1 100644 --- a/src/main/java/gregtech/api/logic/ProcessingLogic.java +++ b/src/main/java/gregtech/api/logic/ProcessingLogic.java @@ -29,6 +29,7 @@ public class ProcessingLogic { protected IRecipeLockable recipeLockableMachine; protected Supplier<GT_Recipe_Map> recipeMapSupplier; protected GT_Recipe lastRecipe; + protected ItemStack specialSlotItem; protected ItemStack[] inputItems; protected ItemStack[] outputItems; protected ItemStack[] currentOutputItems; @@ -73,6 +74,11 @@ public class ProcessingLogic { return this; } + public ProcessingLogic setSpecialSlotItem(ItemStack specialSlotItem) { + this.specialSlotItem = specialSlotItem; + return this; + } + /** * Overwrites item output result of the calculation. */ @@ -213,6 +219,7 @@ public class ProcessingLogic { public ProcessingLogic clear() { this.inputItems = null; this.inputFluids = null; + this.specialSlotItem = null; this.outputItems = null; this.outputFluids = null; this.calculatedEut = 0; @@ -252,8 +259,14 @@ public class ProcessingLogic { recipeLockableMachine.getSingleRecipeCheck() .getRecipe()); } else { - findRecipeResult = recipeMap - .findRecipeWithResult(lastRecipe, false, false, availableVoltage, inputFluids, null, inputItems); + findRecipeResult = recipeMap.findRecipeWithResult( + lastRecipe, + false, + false, + availableVoltage, + inputFluids, + specialSlotItem, + inputItems); } GT_Recipe recipe; |