Skip to content

Commit

Permalink
Fix Arrows/Bolts having hardcoded amount of modifiers, not respecting…
Browse files Browse the repository at this point in the history
… material traits like writeable. #1230
  • Loading branch information
bonii-xx committed Dec 18, 2014
1 parent bd0fb35 commit 5422d38
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/tconstruct/weaponry/WeaponryHandler.java
Expand Up @@ -86,8 +86,9 @@ public void onAmmoCrafted(ToolCraftEvent.NormalTool event)
{
tags.setInteger("Fiery", 5);
}
// arrows get only 2 modifiers
tags.setInteger("Modifiers", 2);
// arrows get only 2 modifiers (so one less) by default
int mods = Math.max(0, tags.getInteger("Modifiers")-1);
tags.setInteger("Modifiers", mods);
}
else if(event.tool instanceof BoltAmmo)
{
Expand All @@ -113,7 +114,9 @@ else if(event.tool instanceof BoltAmmo)
int reinforced = Math.max(headMat.reinforced(), coreMat.reinforced());

setAmmoData(tags, durability, weight, breakChance, accuracy, shoddy, reinforced);
tags.setInteger("Modifiers", 2);

int mods = Math.max(0, tags.getInteger("Modifiers")-1);
tags.setInteger("Modifiers", mods);
}

// now that durability has been handled...
Expand Down

0 comments on commit 5422d38

Please sign in to comment.