Forbidden and Arcanus

Forbidden and Arcanus

28M Downloads

Negative blood

mattba10 opened this issue ยท 14 comments

commented

Describe the bug
Somehow I got negative blood

To Reproduce
Steps to reproduce the behavior:

  1. Use pipez mod
  2. import full blood test tubes and allow all other slots to be empty
  3. 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

commented

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?

commented

i'd probably switch the usage of short to int here

https://github.com/stal111/Forbidden-Arcanus/blob/1.20.x/src/main/java/com/stal111/forbidden_arcanus/common/block/entity/forge/ritual/RitualInput.java

considering the amount is an int
and see if the issue persists

commented

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.

commented

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

commented

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

commented

Update; did it again - no clue how; wasn't even using pipez mod - just putting blood in manually
image

commented

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.

commented

image
I also encountered this situation, I suspect the data type is too small

commented

Did this happen at a special amount? Currently trying to reproduce it but no luck so far.

commented

image
new situation, when blood 'add' to -15536, no matter how much blood volume is added

commented

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.

commented

the only place where a short is used (in regards to rituals) is here

commented

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?

commented

Can confirm not resolved - did it today and got negative blood