Merge pull request #6424 from VoidLeech/mc1.18/fix-invalid-deploying-recipe-error-msg

Fix Deployer Recipe Error Messages
This commit is contained in:
simibubi 2024-07-17 11:30:34 +02:00 committed by GitHub
commit f9d96b2498
Failed to generate hash of commit

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);
}