Switch conditions in getRequiredHeldItem and getProcessedItem

This commit is contained in:
VoidLeech 2024-04-29 16:27:57 +02:00
parent d66170c8fe
commit ab4c29bc40
No known key found for this signature in database

View file

@ -43,13 +43,13 @@ public class ItemApplicationRecipe extends ProcessingRecipe<RecipeWrapper> {
}
public Ingredient getRequiredHeldItem() {
if (ingredients.isEmpty())
if (ingredients.size() < 2)
throw new IllegalStateException("Item Application Recipe: " + id.toString() + " has no tool!");
return ingredients.get(1);
}
public Ingredient getProcessedItem() {
if (ingredients.size() < 2)
if (ingredients.isEmpty())
throw new IllegalStateException("Item Application Recipe: " + id.toString() + " has no ingredient!");
return ingredients.get(0);
}