mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-14 01:14:18 +00:00
Fix low durability ammos (javelins) possibly having 0 max ammo
This commit is contained in:
1 parent
ce8b37a39e
commit
206e2ffe0a
1 file changed
+1
-1
@@ -37,7 +37,7 @@ public abstract class AmmoItem extends ToolCore implements IAmmo {
|
||||
@Override
|
||||
public int getMaxAmmo(NBTTagCompound tags) {
|
||||
float dur = tags.getInteger("TotalDurability");
|
||||
return (int)Math.ceil(dur*getAmmoModifier());
|
||||
return Math.max(1, (int)Math.ceil(dur*getAmmoModifier()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user