Jade ๐Ÿ”

Jade ๐Ÿ”

155M Downloads

FluidView#readDefault not working for amounts bigger than max int on NeoForge

Technici4n opened this issue ยท 0 comments

commented

Mod loader

NeoForge

Minecraft version

1.21.1

Mod version

file id 5493270

Modloader version

21.1.113

Modpack info

No response

[IMPORTANT] If bug:

  • I have confirmed this bug is reproducible on a minimal setup, not a modpack with many other mods.

[IMPORTANT] If bug: The latest.log file, not the crash report

No response

Issue description

There is a problem in FluidView#readDefault that makes the fluid show as Air for large amounts. See AztechMC/Modern-Industrialization#1103. The issue is that CommonProxy.getFluidName(fluidObject) will call toFluidStack(fluid) which does a cast of the amount to an int, causing issues if the amount is bigger than an int. I would suggest for example to pass an amount of 1, the name usually not being dependent on the amount of the stack. Thank you!