[1.18.2] [BUG] Armor Breaking causes Apple duplications
ConqAra opened this issue ยท 4 comments
When I was using the enchanted golden apple armor and one piece broke it started spawning enchanted golden apples on the floor every time I got hit. This happened for every other piece that broke as well, causing more god apples to spawn each time I was hit until all my armor pieces were broken.
There was no visible errors said from the mod itself, but this was in the log, presumably happening everytime I got hit after an armor piece broke
[11:57:46] [Server thread/INFO]: golden Count: 0, enchanted golden Count: 4
[11:57:47] [Server thread/INFO]: golden Count: 0, enchanted golden Count: 4
[11:57:49] [Server thread/INFO]: golden Count: 0, enchanted golden Count: 4
[11:57:51] [Server thread/INFO]: golden Count: 0, enchanted golden Count: 4
[11:57:52] [Server thread/INFO]: golden Count: 0, enchanted golden Count: 4
[11:57:54] [Server thread/INFO]: golden Count: 0, enchanted golden Count: 4
[11:57:55] [Server thread/INFO]: golden Count: 0, enchanted golden Count: 4
[11:57:57] [Server thread/INFO]: golden Count: 0, enchanted golden Count: 4
[11:58:00] [Server thread/INFO]: golden Count: 0, enchanted golden Count: 4
[11:58:02] [Server thread/INFO]: golden Count: 0, enchanted golden Count: 4
Hi, thank you for bringing this to my attention.
So far i have not been able to reproduce the bug in 1.18.2 and 1.19.2.
I`ll try to explain my code:
To spawn apples, incoming damage + the already endured damage by the armor must be greater than the armors health. This means that the armor is broken and the item doesnt exist anymore.
Everytime you get hit it calculates how many apple armor pieces you have, there is no information that is stored.
Therefore the issue should be a conflicting mod.
The logging message you are seeing gets created everytime you are hit and have enchanted golden apple armor equipped. It tells you how many pieces you currently have.
Did the bug start appearing after these logs? https://paste.ee/p/guCIp#s=0&l=3313
On line 3069 till 3086 is the where the bug happened