Fabric API for 1.19 is incompatible with dev servers using Fabric API started by fabric-loom
jakobkmar opened this issue ยท 10 comments
The following setup is incompatible:
Server:
dev server started using fabric-loom runServer
, only fabric-api added using modImplementation - the mod itself I used during my test is just a placeholder and does nothing
Client:
latest fabric api loaded
Other reports in the discord also mentioned this exact error being logged:
[15:12:37] [Render thread/ERROR]: Registry remapping failed!
net.fabricmc.fabric.impl.registry.sync.RemapException: Received ID map for minecraft:command_argument_type contains IDs unknown to the receiver!
- minecraft:test_class
- minecraft:test_argument
I assume the client is not in a development environment?
The issue is the fabric gametest mod does different things in a development environment, see for example here:
https://github.com/FabricMC/fabric/blob/1.19/fabric-gametest-api-v1/src/main/java/net/fabricmc/fabric/mixin/gametest/ArgumentTypesMixin.java
You can exclude the gametest mod in the development environment like this:
modImplementation("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}") {
exclude group: "net.fabricmc.fabric-api", module: "fabric-gametest-api-v1"
}
Should Fabric API consider virtualizing argument types so that server-only argument types can be used?
This approach would be similar to the one done by Velocity and CrossStitch, and would only be needed when a Fabric API server needs to send non-vanilla argument types to clients without those argument types.
Should Fabric API consider virtualizing argument types so that server-only argument types can be used?
See CommandTreeS2CPacket.ArgumentNode.write()
and CommandTreeS2CPacket.readArgumentBuilder()
where it uses the rawId of the registered argument serializers to serialize/deserialize the arguments.
Any mismatch between those ids is going to cause very broken behaviour.
There is this old PR #1339 which was mentioned on a similar issue #2168 about block entities.
Virtualization would mean all argument types would appear to clients as string argument types or similar, potentially only if the client does not have the argument type. Raw IDs would no longer become an issue as a result.
But if you change the client code to uses "Identifiers" instead of rawIds then client only fabric installations won't be able to talk to vanilla servers?
this is the error :
[01:47:18] [main/INFO] (FabricLoader/Resolution) Reason: [HARD_DEP mod ${version} {depends fabric-api @ [*]}] [01:47:18] [main/INFO] (FabricLoader/Resolution) Fix: add [add:fabric-api 1 ([(-โ,โ)])], remove [], replace [] [01:47:18] [main/ERROR] (FabricLoader) Incompatible mod set! net.fabricmc.loader.impl.FormattedException: Mod resolution encountered an incompatible mod set! A potential solution has been determined: - Install fabric-api, any version. Unmet dependency listing: - Mod 'A Mod' (mod) ${version} requires any version of fabric-api, which is missing! at net.fabricmc.loader.impl.FabricLoaderImpl.load(FabricLoaderImpl.java:190) ~[fabric-loader-0.14.9.jar:?] FabricLoaderImpl.java:190 at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:148) ~[fabric-loader-0.14.9.jar:?] Knot.java:148 at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:68) [fabric-loader-0.14.9.jar:?] Knot.java:68 at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.14.9.jar:?] KnotClient.java:23 at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) [dev-launch-injector-0.2.1+build.8.jar:?] Main.java:86
hey please help me
even that i have fabric API i cant run my mod because it says that i dont have fabric API...
What do i do?