SpongePowered / SpongeForge

A Forge mod that implements SpongeAPI
http://www.spongepowered.org/
MIT License
1.14k stars 306 forks source link

Glitch in hunger bar #2740

Open Brycey92 opened 5 years ago

Brycey92 commented 5 years ago

I am currently running

Issue Description When AppleCore is running on a SpongeForge server (Tested with SF 3616 and 3693 on Forge 2768 and with SF 3693 on Forge 2831), the hunger bar glitches as shown in the gif below. When AppleCore is removed from either the client or server, or when SF is removed from the server, the issue stops.

2019-05-06_14-15-50

client debug.log client latest.log server debug.log server latest.log

gabizou commented 5 years ago

I'm figuring there's something happening between AppleCore's modifications to FoodStats and Sponge requesting sending the player's current saturation level and that level appears to be different than what AppleCore is expecting (or probably it's also sending those updates?).

There's too much raw asm and redirection going on with Applecore for me to figure out what is actually going on, but I can say that Sponge sends the update to the client with the normal food stats methods.

As far as what AppleCore expects, I'm not able to put more time at this moment to figure something out.

Brycey92 commented 5 years ago

Thanks for your investigation thus far! Could this potentially be an AppleCore issue?

phit commented 5 years ago

seems to be fixed, can't reproduce this with AppleCore-mc1.12.2-3.2.0.jar and spongeforge-1.12.2-2838-7.1.7-RC3807.jar

Brycey92 commented 5 years ago

I'm able to reproduce with the same version of AppleCore and SF 1.12.2-2838-7.1.7-RC3848.

I did a lot more digging, and I found that the issue only happens when you have a dimension or world loaded that's set to peaceful difficulty aside from the one you're in. The dimension you're in must be set to something other than peaceful, and the peaceful dimension must be loaded.

I'm thinking this might be an AppleCore issue, but I have no idea how to force load a dimension without Sponge.

ImMorpheus commented 5 years ago

@Brycey92 Can you retest with latest ?

Brycey92 commented 5 years ago

@ImMorpheus now, using SF 7.1.7-RC3874, the hunger bar is filled in the non-peaceful dimensions, but it periodically resets to what the hunger should be and refills again. Running around and using hunger triggers this reset and refill phenomenon. Hunger works properly (refills and doesn't deplete) in the peaceful dimension.