Move paper handling to event. Refactor code for readabalitiy.

This commit is contained in:
Bernhard Bonigl committed 2014-09-03 11:23:50 +02:00
1 parent e05768b801
commit 794e953f01
2 files changed
+48 -31

No files matched your search

@@ -307,15 +307,7 @@ public class ToolBuilder
compound.getCompoundTag("InfiTool").setInteger("Unbreaking", buildReinforced(headMat, handleMat, accessoryMat, extraMat));
compound.getCompoundTag("InfiTool").setFloat("Shoddy", buildShoddy(headMat, handleMat, accessoryMat, extraMat));
int modifiers = item.getModifierAmount();
if (accessory == -1)
modifiers += (head == 9 ? 2 : 0);
else
modifiers += (head == 9 ? 1 : 0) + (accessory == 9 ? 1 : 0);
modifiers += +(handle == 9 ? 1 : 0);
modifiers += +(extra == 9 ? 1 : 0);
compound.getCompoundTag("InfiTool").setInteger("Modifiers", modifiers);
compound.getCompoundTag("InfiTool").setInteger("Modifiers", item.getModifierAmount());
if (name != null && !name.equals(""))
{