diff options
author | miozune <miozune@gmail.com> | 2024-09-09 09:21:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 02:21:25 +0200 |
commit | c43cdd94e65c6e19d8380d1b2c87ce19d5d49011 (patch) | |
tree | 67e104846c6122fdc2eaf2dcc29717facd6a51df /src/main/java/gregtech/api/metatileentity/implementations/MTEBasicGenerator.java | |
parent | b15f89a14827bdb621d45745d165e1caf4265fef (diff) | |
download | GT5-Unofficial-c43cdd94e65c6e19d8380d1b2c87ce19d5d49011.tar.gz GT5-Unofficial-c43cdd94e65c6e19d8380d1b2c87ce19d5d49011.tar.bz2 GT5-Unofficial-c43cdd94e65c6e19d8380d1b2c87ce19d5d49011.zip |
Remove findRecipe methods (#3084)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: boubou19 <miisterunknown@gmail.com>
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/implementations/MTEBasicGenerator.java')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/implementations/MTEBasicGenerator.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/MTEBasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/MTEBasicGenerator.java index ac923bc699..963acf191f 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/MTEBasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/MTEBasicGenerator.java @@ -305,7 +305,9 @@ public abstract class MTEBasicGenerator extends MTEBasicTank implements RecipeMa public long getFuelValue(ItemStack aStack, boolean aLong) { if (GTUtility.isStackInvalid(aStack) || getRecipeMap() == null) return 0; - GTRecipe tFuel = getRecipeMap().findRecipe(getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); + GTRecipe tFuel = getRecipeMap().findRecipeQuery() + .items(aStack) + .find(); if (tFuel == null) return 0; long liters = 10L; // 1000mb/100 @@ -314,7 +316,9 @@ public abstract class MTEBasicGenerator extends MTEBasicTank implements RecipeMa public ItemStack getEmptyContainer(ItemStack aStack) { if (GTUtility.isStackInvalid(aStack) || getRecipeMap() == null) return null; - GTRecipe tFuel = getRecipeMap().findRecipe(getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); + GTRecipe tFuel = getRecipeMap().findRecipeQuery() + .items(aStack) + .find(); if (tFuel != null) return GTUtility.copyOrNull(tFuel.getOutput(0)); return GTUtility.getContainerItem(aStack, true); } |