mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 20:22:36 +00:00
Fix Division through zero with Longbow with low weight arrows
This commit is contained in:
1 parent
cb33bb1b72
commit
1c1ae28b69
1 file changed
+1
-1
@@ -51,7 +51,7 @@ public class LongBow extends BowBaseAmmo {
|
||||
float weight = tags.getFloat("Mass");
|
||||
|
||||
// we need heavier arrows because we have POW. therefore we increase the weight penality on accuracy
|
||||
accuracy += ((100f-matAccuracy)/10f)/(weight-1f);
|
||||
accuracy += ((100f-matAccuracy)/10f)/Math.max(1f, weight-1f);
|
||||
if(accuracy < 0)
|
||||
accuracy = 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user