Darkhax-Minecraft / Open-Loader

An open source resource and data loader for Minecraft.
GNU Lesser General Public License v2.1
19 stars 7 forks source link

[1.19.2] Datapack (perhaps just for client) doesn't appear active on server side until singleplayer is played once. #26

Closed Darkmega18 closed 1 year ago

Darkmega18 commented 1 year ago

OpenLoader-Forge-1.19.2-15.0.1.jar Forge: 43.2.14

The datapack in question is a datapack for the mod "Project War Dance" and "Cloak and dagger" (and it's requirements footwork and attributizer). The mod uses datapacks to assign posture damage, defense and other attribute based stats onto existing items and armors via tags and jsons etc. This facilitates stuff like dualwielding, twohanded weapons and some other features like additional armor bonuses/incentives.

However I've found recently that with a large datapack compilation I made when loading it into the server via the configs, then loading into said server as the first thing when loading up the game the datapack even in the mod itself doesn't seem to be properly activated to the player. resulting in inability to dualwield and see posture values etc.

This however changes if I briefly log into a normal world, for example a simple super fast loading flatlands map. open inventory to check items are properly acknowledged and registered, then return to menu and enter multiplayer. Then the datapack registers to the player. This seems maybe visual, and I'm not sure if it also extends to my other recipe based resourcepacks also, but tagged things that allow some features to run are stifled cause of it until it rights itself.

I can send a pack I've been fiddling around with with the datapack intact if you'd like something exactly the same as what I have to test and see what I'm on about before trying to figure out whats actually wrong if you've got no clue as to where the issue might occur.

Darkhax commented 1 year ago

Based on the information you have provided it sounds like OpenLoader is working as intended, however the additional mods in question are not syncing their data with the client correctly. You should attempt to recreate the issue without OpenLoader using the datapacks folder in your server's world and then report the issue to them.

To give some additional context, datapacks can only load on a server thread, whether that be dedicated multiplayer or integrated singleplayer. Mods are expected to sync data necessary for client visualization to the client which is how vanilla handles recipes in the recipe book, and how mods like JEI display recipes from the server. The issue resolves itself when joining the client because you are forcing the data to load on the integrated client, however this is only a partial fix. If the server's version of the datapack was different from the one in the client you would only see the client version and none of the server's changes.