use item max stack size and not material's

This commit is contained in:
alexcrea 2025-07-27 04:13:24 +02:00
parent e4176404ac
commit b8f46365a1
Signed by: alexcrea
GPG key ID: E346CD16413450E3

View file

@ -41,7 +41,7 @@ object CustomRecipeUtil {
else { else {
// test amount // test amount
val resultItem = recipe.resultItem!! // we know exist as the recipe was returned to us val resultItem = recipe.resultItem!! // we know exist as the recipe was returned to us
val maxResultAmount = resultItem.type.maxStackSize/resultItem.amount val maxResultAmount = resultItem.maxStackSize/resultItem.amount
val maxLeftAmount = leftItem.amount/recipe.leftItem!!.amount val maxLeftAmount = leftItem.amount/recipe.leftItem!!.amount
val maxRightAmount = if(rightItem == null){ maxLeftAmount } else{ rightItem.amount/recipe.rightItem!!.amount } val maxRightAmount = if(rightItem == null){ maxLeftAmount } else{ rightItem.amount/recipe.rightItem!!.amount }