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() { public Ingredient getRequiredHeldItem() {
if (ingredients.isEmpty()) if (ingredients.size() < 2)
throw new IllegalStateException("Item Application Recipe: " + id.toString() + " has no tool!"); throw new IllegalStateException("Item Application Recipe: " + id.toString() + " has no tool!");
return ingredients.get(1); return ingredients.get(1);
} }
public Ingredient getProcessedItem() { public Ingredient getProcessedItem() {
if (ingredients.size() < 2) if (ingredients.isEmpty())
throw new IllegalStateException("Item Application Recipe: " + id.toString() + " has no ingredient!"); throw new IllegalStateException("Item Application Recipe: " + id.toString() + " has no ingredient!");
return ingredients.get(0); return ingredients.get(0);
} }