diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2022-12-27 19:56:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-27 19:56:24 +0100 |
commit | fa7abebe73f629c17e7a43d8c50307d2f8aa588e (patch) | |
tree | 0866c3e6207c1f314a35f0d22d548649de918e54 /src | |
parent | d9c0192761734a9cf4595f990df408a278b1e430 (diff) | |
download | NotEnoughUpdates-fa7abebe73f629c17e7a43d8c50307d2f8aa588e.tar.gz NotEnoughUpdates-fa7abebe73f629c17e7a43d8c50307d2f8aa588e.tar.bz2 NotEnoughUpdates-fa7abebe73f629c17e7a43d8c50307d2f8aa588e.zip |
Craft cost price calculation improved (#511)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java | 6 | ||||
-rw-r--r-- | src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/KatRecipe.kt | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java b/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java index 53e72dc1..e606fc49 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java @@ -27,6 +27,7 @@ import io.github.moulberry.notenoughupdates.NEUManager; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.miscgui.GuiPriceGraph; import io.github.moulberry.notenoughupdates.recipes.Ingredient; +import io.github.moulberry.notenoughupdates.recipes.ItemShopRecipe; import io.github.moulberry.notenoughupdates.recipes.NeuRecipe; import io.github.moulberry.notenoughupdates.util.Constants; import io.github.moulberry.notenoughupdates.util.Utils; @@ -902,6 +903,11 @@ public class APIManager { if (recipes != null) RECIPE_ITER: for (NeuRecipe recipe : recipes) { + if (recipe instanceof ItemShopRecipe) { + if (vanillaItem) { + continue; + } + } if (recipe.hasVariableCost() || !recipe.shouldUseForCraftCost()) continue; float craftPrice = 0; for (Ingredient i : recipe.getIngredients()) { diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/KatRecipe.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/KatRecipe.kt index c4b64969..e6dc0abc 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/KatRecipe.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/KatRecipe.kt @@ -161,4 +161,6 @@ data class KatRecipe( override fun getBackground(): ResourceLocation { return ResourceLocation("notenoughupdates:textures/gui/katting_tall.png") } + + override fun shouldUseForCraftCost() = false } |