stal111 / Forbidden-Arcanus

Forbidden & Arcanus Mod Github
https://minecraft.curseforge.com/projects/forbidden-arcanus
121 stars 48 forks source link

Negative blood #379

Open mattba10 opened 9 months ago

mattba10 commented 9 months ago

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

Additional context N/A

mattba10 commented 9 months ago

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

stal111 commented 9 months ago

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

GiGDDragon commented 9 months ago

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.

SBshenqianye commented 9 months ago

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

SBshenqianye commented 9 months ago

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

AbdeI1 commented 8 months ago

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.

SiverDX commented 8 months ago

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

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

stal111 commented 8 months ago

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?

Alaric323 commented 6 months ago

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.

SiverDX commented 6 months ago

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

The1368 commented 6 months ago

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

miapuffia commented 5 months ago

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

zinerith commented 3 months ago

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?

mattba10 commented 3 months ago

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

HeroBrianMack commented 2 months ago

@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.