RandomMcSomethin / fallingleaves

MIT License
43 stars 20 forks source link

Error when using this mod on a LAN server #59

Closed DarkFireNinja closed 3 months ago

DarkFireNinja commented 7 months ago

When i try to use this mod on a LAN server with my brother who doesn't have the mod installed (he is using Vanilla Minecraft), he gets this error when he tries to join my world:

**Connection Lost

Unsupported (vanilla?) client! This server requires modded client to join!**

I'm using Quilt Loader on version 1.20.1 of Minecraft.

Fourmisain commented 7 months ago

I think this is the same issue as #54.

On one hand, Falling Leaves is a client-side mod, meaning you can join any server with it and putting it on a dedicated server won't do anything either. But when you host a LAN-server, your brother connects to your client's so called integrated server, which Falling Leaves does modify (to add the leaf particles).

There's not a lot we can do about that, so you have to work around it. Two ways I can think off are:

DarkFireNinja commented 7 months ago

@Fourmisain Thank you so much for the reply! and thank you for explaining to me the reason why this happened. I will probably just give my brother the mod as well.

And yes, this is the same issue as #54. My bad for not knowing that this issue was already opened

So, if there isn't a way of fixing this, then you can close this issue if you'd like. Thanks again!

Fourmisain commented 7 months ago

My bad for not knowing that this issue was already opened

Oh don't worry about it, it's not exactly easy to find and I just added that as a reference for us.

So, if there isn't a way of fixing this, then you can close this issue if you'd like.

It's theoretically possible to fix, but it'll probably result in hacky code and might cause new issues as well (like the /particle command not working for leaf particles or potential crashes with some mods).

I said that and curiosity got the best of me.

After some looking into it, I found a way to spawn particles without adding them to the particle registry, which should allow for vanilla clients to join via LAN.

If you wanna try it out, you can get a test release here: https://github.com/RandomMcSomethin/fallingleaves/releases/tag/no_registry-test

Fourmisain commented 7 months ago

Did some actual testing and found this specific issue only exists on Quilt due to it's more strict registry sync. On Fabric you can join with a vanilla client even when there's modded blocks - and you can stand on air. 😅

Also found the last test release crashes on 1.20.1 (though not on 1.20.4), so here's a fixed version: https://github.com/RandomMcSomethin/fallingleaves/releases/tag/no_registry-test-2

YoshiRulz commented 3 months ago

If the connecting client has the Fabric API installed but not Falling Leaves, it will also fail to connect due to registry mismatches.

relevant part of log ``` [16:48:16] [Render thread/ERROR]: Received unknown remote registry entries from server [16:48:16] [Render thread/ERROR]: Registry entry (fallingleaves:falling_leaf) is missing from local registry (minecraft:particle_type) [16:48:16] [Render thread/ERROR]: Registry entry (fallingleaves:falling_leaf_conifer) is missing from local registry (minecraft:particle_type) [16:48:16] [Render thread/ERROR]: Registry entry (fallingleaves:falling_snow) is missing from local registry (minecraft:particle_type) [16:48:16] [Render thread/ERROR]: Registry remapping failed! java.util.concurrent.CompletionException: net.fabricmc.fabric.impl.registry.sync.RemapException: Received 3 registry entries that are unknown to this client. This is usually caused by a mismatched mod set between the client and server. See the client logs for more details. The following registry entry namespaces may be related: fallingleaves at net.fabricmc.fabric.impl.registry.sync.RegistrySyncManager.lambda$receivePacket$0(RegistrySyncManager.java:146) ~[fabric-registry-sync-v0-4.0.18+78d798af4f-4d8236a4789003c6.jar:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] at net.minecraft.class_1255.method_18859(class_1255.java:156) ~[client-intermediary.jar:?] at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?] at net.minecraft.class_1255.method_16075(class_1255.java:130) ~[client-intermediary.jar:?] at net.minecraft.class_1255.method_5383(class_1255.java:115) ~[client-intermediary.jar:?] at net.minecraft.class_310.method_1523(class_310.java:1283) ~[client-intermediary.jar:?] at net.minecraft.class_310.method_1514(class_310.java:888) ~[client-intermediary.jar:?] at net.minecraft.client.main.Main.main(Main.java:265) ~[minecraft-1.20.4-client.jar:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.7.jar:?] at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.7.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.15.7.jar:?] at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87) ~[NewLaunch.jar:?] at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130) ~[NewLaunch.jar:?] at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) ~[NewLaunch.jar:?] Caused by: net.fabricmc.fabric.impl.registry.sync.RemapException: Received 3 registry entries that are unknown to this client. This is usually caused by a mismatched mod set between the client and server. See the client logs for more details. The following registry entry namespaces may be related: fallingleaves at net.fabricmc.fabric.impl.registry.sync.RegistrySyncManager.checkRemoteRemap(RegistrySyncManager.java:365) ~[fabric-registry-sync-v0-4.0.18+78d798af4f-4d8236a4789003c6.jar:?] at net.fabricmc.fabric.impl.registry.sync.RegistrySyncManager.apply(RegistrySyncManager.java:261) ~[fabric-registry-sync-v0-4.0.18+78d798af4f-4d8236a4789003c6.jar:?] at net.fabricmc.fabric.impl.registry.sync.RegistrySyncManager.lambda$receivePacket$0(RegistrySyncManager.java:143) ~[fabric-registry-sync-v0-4.0.18+78d798af4f-4d8236a4789003c6.jar:?] ... 14 more [16:48:16] [Render thread/WARN]: Client disconnected with reason: Received 3 registry entries that are unknown to this client. This is usually caused by a mismatched mod set between the client and server. See the client logs for more details. The following registry entry namespaces may be related: fallingleaves ```
Fourmisain commented 3 months ago

I released a new version with an experimental "Register Leaf Particles" setting. This setting is on by default. Turning this setting off on the LAN server aka the host should fix the original issue.

I wanted to turn the setting off by default, but doing so breaks the /particle (singleplayer) command and it might have some other unforeseen consequences. Sodium Extra for example can manage particles, but only if they are registered - not a particularly big deal since particles can already be turned off via Falling Leaves' settings, but still, it's probably safer this way.