Skip to content

Commit

Permalink
Fix determining the result of item script recipes
Browse files Browse the repository at this point in the history
For #1481
  • Loading branch information
Morphan1 committed Oct 7, 2016
1 parent 8fe5e70 commit b9bac54
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -92,7 +92,7 @@ public void destroy() {
@Override
public boolean applyDetermination(ScriptContainer container, String determination) {
if (dItem.matches(determination)) {
inventory.setResult(dItem.valueOf(determination).getItemStack());
result = dItem.valueOf(determination);
}

return super.applyDetermination(container, determination);
Expand Down Expand Up @@ -144,5 +144,8 @@ public void onRecipeFormed(PrepareItemCraftEvent event) {
if (cancelled) {
inventory.setResult(null);
}
else {
inventory.setResult(result.getItemStack());
}
}
}

0 comments on commit b9bac54

Please sign in to comment.