Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fermentation Barrel fluid render anomoly #375

Closed
PitchBright opened this issue Jun 8, 2016 · 2 comments
Closed

Fermentation Barrel fluid render anomoly #375

PitchBright opened this issue Jun 8, 2016 · 2 comments
Labels

Comments

@PitchBright
Copy link

PitchBright commented Jun 8, 2016

Note: I've configured my Barrels to holder a much greater capacity than default. Bottles are still set to default 333mb though.

When I add bottles of fluid to the barrel for fluid storage, it seems that when it reaches a certain point it stops displaying the fluid in the GUI. If I continue to add fluids, there comes a point where it will begin rendering the fluids again, but display the incorrect value in the GUI.

-WAILA shows the correct values, always.
-Discard button is disabled/inactive when the fluids are NOT rendering properly.

The pattern I'm noticing is as follows:

Render fine up to, and including Bottles 1-98.
Adding a 99th bottle is when it stops rendering the fluid correctly.
Continue adding bottles and will not render up to, and including Bottles 99-196.
Add a 197th bottle is when the fluids start rendering correctly again, BUT ALSO, displays the incorrect amount of fluid and quantity in the GUI.*

*The interesting thing about the amount of fluid that seems to make it render properly again, is that it's the 65536th millibucket that does the trick. So I'm guessing it's something to do with 16-bit something. Hope that's a helpful clue somehow.

Photo-demonstration here: https://imgur.com/a/WY4e7

Also note: Issue doesn't seem to occur in Singleplayer.

@IceDragon200
Copy link
Member

IceDragon200 commented Jun 8, 2016

@PitchBright Ah, now it makes sense, yes it is as you said, it's a 16-bit issue, minecraft rounds off network data to 16-bit ;(

Now that I think about it, I can split the amount across 2 values in high and low segments :D

// From server
final short low = amount & 0xFFFF;
final short high = (amount >> 16) & 0xFFFF;

// Client Side
final int newAmount = (high << 16) | low;

Hopefully it works...

Okay, fixed for 2.6.1 #376

@PitchBright
Copy link
Author

Awesome! Glad you figured it out. Thanks for fixing that up!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants