Fixes for graphical /recipe issues. Closes #134

- Fixed shaped recipe ItemStacks displaying 0s
- Fixed recipes supporting any data value of blocks missing textures
This commit is contained in:
Jikoo 2015-08-19 09:11:55 -04:00 committed by vemacs
parent 9307f9b9c1
commit 046752f8c2

View File

@ -90,7 +90,9 @@ public class Commandrecipe extends EssentialsCommand {
if (item == null) { if (item == null) {
continue; continue;
} }
item.setAmount(0); if (item.getDurability() == Short.MAX_VALUE) {
item.setDurability((short) 0);
}
view.getTopInventory().setItem(j * 3 + k + 1, item); view.getTopInventory().setItem(j * 3 + k + 1, item);
} }
} }
@ -129,7 +131,11 @@ public class Commandrecipe extends EssentialsCommand {
user.setRecipeSee(true); user.setRecipeSee(true);
final InventoryView view = user.getBase().openWorkbench(null, true); final InventoryView view = user.getBase().openWorkbench(null, true);
for (int i = 0; i < ingredients.size(); i++) { for (int i = 0; i < ingredients.size(); i++) {
view.setItem(i + 1, ingredients.get(i)); final ItemStack item = ingredients.get(i);
if (item.getDurability() == Short.MAX_VALUE) {
item.setDurability((short) 0);
}
view.setItem(i + 1, item);
} }
} else { } else {