Carpet

Carpet

2M Downloads

Carpet Players Incompatibility with Floodgate and Geyser

HarryRich02 opened this issue · 18 comments

commented

Spawning of carpet players does not work with Floodgate Fabric and Geyser Fabric.

commented

Retry with the following commands:

kill 111
carpet superSecretSetting true
player 111 spawn

What do you get in the console or logs when you rerun /player 111 spawn after making sure that player isn't online and /carpet superSecretSetting true?

commented

Idk how much of this is relevant but here you go:
25.10 20:16:24 [Server] Server thread/ERROR Command exception: /player 111 spawn
25.10 20:16:24 [Server] INFO java.lang.NullPointerException: Cannot invoke "io.netty.channel.Channel.attr(io.netty.util.AttributeKey)" because the return value of "net.kyori.adventure.platform.fabric.impl.accessor.ConnectionAccess.getChannel()" is null
25.10 20:16:24 [Server] INFO at net.minecraft.class_3244.handler$zpe000$adventure$initTracking(class_3244.java:5656) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_3244.(class_3244.java:202) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at carpet.patches.NetHandlerPlayServerFake.(NetHandlerPlayServerFake.java:15) ~[fabric-carpet-1.17.1-1.4.50+v211021.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_3324.redirect$zin000$replaceNetworkHandler(class_3324.java:3456) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_3324.method_14570(class_3324.java:167) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at carpet.patches.EntityPlayerMPFake.createFake(EntityPlayerMPFake.java:65) ~[fabric-carpet-1.17.1-1.4.50+v211021.jar:?]
25.10 20:16:24 [Server] INFO at carpet.commands.PlayerCommand.spawn(PlayerCommand.java:316) ~[fabric-carpet-1.17.1-1.4.50+v211021.jar:?]
25.10 20:16:24 [Server] INFO at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:263) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:177) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_2170.method_9249(class_2170.java:251) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_3244.method_14370(class_3244.java:1222) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_3244.method_31286(class_3244.java:1206) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_3244.method_12048(class_3244.java:1189) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_2797.method_12115(class_2797.java:30) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_2797.method_11054(class_2797.java:7) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_2600.method_11072(class_2600.java:21) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_3738.run(class_3738.java:18) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_1255.method_18859(class_1255.java:151) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:788) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:164) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_1255.method_16075(class_1255.java:125) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:770) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:764) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.class_1255.method_18857(class_1255.java:134) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:749) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.server.MinecraftServer.handler$zhh000$modifiedRunLoop(MinecraftServer.java:4899) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:676) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-server.jar:?]
25.10 20:16:24 [Server] INFO at java.lang.Thread.run(Thread.java:831) [?:?]
25.10 20:16:24 [Multicraft] 111[local] ran command Message of the Day
25.10 20:16:39 [Server] Network Listener - #1/INFO Bedrock user with ip: /82.2.125.136 has disconnected for reason CLOSED_BY_REMOTE_PEER
25.10 20:16:39 [Server] nioEventLoopGroup-3-4/INFO HarryRich02 has disconnected from remote Java server on address 198.244.170.57 because of CLOSED_BY_REMOTE_PEER
25.10 20:16:39 [Server] Netty Server IO #1/INFO floodgate.ingame.disconnect_name .HarryRich02
25.10 20:16:39 [Disconnect] User .HarryRich02 has disconnected, reason: Disconnected
25.10 20:16:39 [Server] Server thread/INFO .HarryRich02 left the game
25.10 20:16:39 [Server] Server thread/INFO Disconnecting client .HarryRich02

commented

What do you get when you run /player 111 spawn with those mods installed in addition to Carpet?

commented

In the console it says that they connected but in the chat I get “An unexpected error occurred trying to execute that command”.

commented

I feel like I've seen this incompatibility before and it was fixed in geyser/floodgate already. Can you check you are running the latest version of them? If that's the case it may be a new incompatibility.

commented

Yes I am running the latest version.

commented

Yes, this was something that we worked around, but we updated our adventure-platform-fabric dependency which now has a native locale API that inherits the same issue we fixed.

commented

Is there something that can be done from Carpet to fix the incompatibility or at least help the situation? (without giving complete network handlers to fake players)

commented

Perhaps set their channel to an EmbeddedChannel or LocalChannel? The latter is used in Minecraft for singleplayer, but the former I believe is used in testing purposes but may be enough for applications not to complain?

commented

Perhaps set their channel to an EmbeddedChannel or LocalChannel? The latter is used in Minecraft for singleplayer, but the former I believe is used in testing purposes but may be enough for applications not to complain?

This problem happened again in version 1.18

commented

Perhaps set their channel to an EmbeddedChannel or LocalChannel? The latter is used in Minecraft for singleplayer, but the former I believe is used in testing purposes but may be enough for applications not to complain?

#1205

commented

This issue is already known. Please stop spamming issue trackers.

commented

Does Geyser use anything in the ChannelHandlerContext passed to ClientConnection#channelActive (yarn name)?

It's the "exposed" way in vanilla to set the connection's channel, I did an aberration with it to set a channel and while it seems like vanilla responds to it correctly, I'd like to make sure that will not cause problems with Geyser at least.

commented

Coming Soon (TM) (if the PR is accepted):
imagen
(setting up the server and getting the screenshot took over twenty times what the actual fix took, else I wouldn't spam here)

commented

Coming Soon (TM)(如果 PR 被接受):( 設置服務器並獲取屏幕截圖所需的時間是實際修復所需的 20 倍以上,否則我不會在這裡發送垃圾郵件) 圖像

Great

commented

Preview builds with a potential fix available here for those interested in testing the fix, both for 1.17.1 and 1.18(.1).

Updated today with a different approach if someone was using the previous build.

commented

Preview builds with a potential fix available here for those interested in testing the fix, both for 1.17.1 and 1.18(.1).

Updated today with a different approach if someone was using the previous build.

1.18.1 test Success,thanks