Negative blood
mattba10 opened this issue · 21 comments
Describe the bug
Somehow I got negative blood
To Reproduce
Steps to reproduce the behavior:
- Use pipez mod
- import full blood test tubes and allow all other slots to be empty
- export empty test tubes
Expected behavior
Negative blood should not appear
Screenshots
Unfortunately I broke the forge and wont be trying to recreate the bug - but I can IF required load up a test world
Versions
- Forbidden & Arcanus:
forbidden_arcanus-1.20.1-2.2.3.jar - atm9: 0.2.24
- Forge: 47.2.8
Additional context
N/A
This issue is still unresolved in 1.20.1 currently. Was putting blood in manually via test tubes when it wrapped to the negatives around 30k blood with a Tier 4 forge. When will this get a fix I wonder?
i'd probably switch the usage of short to int here
considering the amount is an int
and see if the issue persists
I'm not using just F&A, but in a different pack (MineColonies Dimensional Adventure) I'm also experiencing this problem. The blood value underflows, and continuously adding blood "maxes" out at -15536 as in SB's screenshot.
I also thought of that behaviour being caused by using a short somewhere but I I haven't found anything problematic yet. It's suspicious though that all reports so far have been using the Atm 9 pack. Did anyone had this problem with just f&a?
Not with just f&a, but in Valhelsia 6. When I manually added test tubes and it hit 30k on a tier 4 forge, it inverted into the negatives
Temporary fix if cheats are enabled:
Stand on top of the forge and run
/data modify block ~ ~-1 ~ Essences.blood set value 20000
You might need to remove the -1 if it says target block is not a block entity
At 30k tier 4 blood becomes -35k then if you keep adding it goes to -15k which in total is the 50k worth of blood.
Did this happen at a special amount? Currently trying to reproduce it but no luck so far.
They used a signed short for blood level 💀 (maybe just add 65536 to your negative number and see if that correctly correlates to the blood level). Also can confirm happens on atm9 0.2.32, forge: 47.2.16, jar version: 2.20.1-2.2.4 with just normally adding blood through blood vials.
the only place where a short is used (in regards to rituals) is here
I also thought of that behaviour being caused by using a short somewhere but I I haven't found anything problematic yet.
It's suspicious though that all reports so far have been using the Atm 9 pack. Did anyone had this problem with just f&a?
@mattba10 have you tried with the newest version of the mod for 1.20.1 (2.26), as I have tried to replicate this issue and reached 50k blood with no issue.
@TheDieselPunk does this happen on a fresh world and with no other mods?
That isn’t in the code in the current version on GitHub for 1.20.1-2.2.6, which is I’m asking. Maybe the GitHub updated without being uploaded on curseforge?
That isn’t in the code in the current version on GitHub for 1.20.1-2.2.6, which is I’m asking. Maybe the GitHub updated without being uploaded on curseforge?
that is vanilla code