[Bug][NeoForge]: star-map does not work
canitzp opened this issue ยท 4 comments
Bug Description
I'm testing the latest AdAstra version (1.16.3) with NeoForge and I ahve noticed, that the star-map does not work. It is just empty.
I don't have any additional datapacks installed.
I also tested several versions of NeoForge, but nothing changed.
How to Reproduce?
- Install AdAstra with NeoForge on Minecraft 1.20.4
- Create a new world
- Run command "/adastra planets"
- View the non-existent planets
Expected Behavior
No response
Version
1.16.3
Mod Loader Version
1.20.4 - 20.4.146-beta
Mod Loader
NeoForge
Logs or additional context
There is no error in log
Code of Conduct
- I have searched the issue tracker and confirmed that the issue has not been reported
- I have checked the FAQ (if one is present) and my issue is not listed
- I have verified that I am using the latest version of the mod
- I have verified that I have installed all the required dependencies for the mod
- I have verified that I do not have Optifine installed. We will close issues if we detect Optifine is in your pack. We cannot fix Optifine issues. Please do not report issues with Optifine present.
So I have investigated this problem a bit. Turns out the "ClientboundSyncPlanetsPacket" does not work properly. The encode (
So I have investigated this problem a bit. Turns out the "ClientboundSyncPlanetsPacket" does not work properly. The encode (
) and decode (
) are never called. Since I don't know, how the ResourcefulLib networking works, I can't investigate further.
The reason they are never called is because Encode and Decode dont get all in singleplayer this is to optimize the games performance as to not do unneeded operations when there is no actual network all it does is send the packet object to the handle method right away.
problem was that since there were no encoding and decoding, ie the map reference was sent directly instead of creating a copy, it was clearing itself and then setting itself to itself. Fixed it by just creating a copy of the map before clearing the original and then setting the original to the copy. It was working on fabric because I guess fabric still encodes and decodes?