SilentChaos512 / Silent-Gear

Modular tool/armor mod (formerly part of Silent's Gems)
https://www.curseforge.com/minecraft/mc-mods/silent-gear
MIT License
84 stars 37 forks source link

Negative Durability Value #448

Open TR7377 opened 2 years ago

TR7377 commented 2 years ago

Versions

Expected Behavior

Chest plate not breaking

Actual Behavior

I made a chest plate made out of uru (fireite alloy/fireite coating, phantom membrane/wool lining), The mod pack allows us to rise star charge above the normal max (in my case I enchanted the uru with star charged 100). My finished chest plate ended up having a durability value of -2147483648. After I died the chest plate broke due to the negative value. Is there a way to prevent it from breaking?

Links/Images

2021-11-21_23 44 15 2021-11-21_23 46 20

Steps to Reproduce the Problem

  1. Make Uru chestplate (maxed in grader, star charged 100 ingots; phantom membrane/wool lining; fireite alloy/fireite coating)
  2. Equip Chest plate
  3. Die
WeasleyWalls commented 2 years ago

After looking at the durability using 'sgear_stats info' on him it would appear the durability is set to 2147483648 which is more than the max 32bit signed integer which is 2147483647 causing the int overflow.

SilentChaos512 commented 2 years ago

Strange, the stats should always be clamped to valid values. Plenty of players have found ways to create capped durability items like that, but I've never seen a stat overflow.

Also, what mod is uru from? I've heard it mentioned before, but I'm not familiar with it.

TR7377 commented 2 years ago

Uru is from KubeJS It’s crafted through Draconic Evo And it’s used to make the mjolnir hammer from mythic botany (botania)