diff --git a/src/main/java/carpet/mixins/ServerGamePacketListenerImplMixin.java b/src/main/java/carpet/mixins/ServerGamePacketListenerImplMixin.java index 2a1fe5dc..714d8a75 100644 --- a/src/main/java/carpet/mixins/ServerGamePacketListenerImplMixin.java +++ b/src/main/java/carpet/mixins/ServerGamePacketListenerImplMixin.java @@ -2,7 +2,6 @@ package carpet.mixins; import carpet.network.CarpetClient; import carpet.network.ServerNetworkHandler; -import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.protocol.PacketUtils; import net.minecraft.network.protocol.game.ServerGamePacketListener; import net.minecraft.network.protocol.game.ServerboundCustomPayloadPacket; @@ -29,9 +28,8 @@ public class ServerGamePacketListenerImplMixin // We should force onto the main thread here // ServerNetworkHandler.handleData can possibly mutate data that isn't // thread safe, and also allows for client commands to be executed - // [TODO] need to investigate if that is actually an issue since carpet doesn't fiddle with its packets. PacketUtils.ensureRunningOnSameThread(packet, (ServerGamePacketListener) this, player.getLevel()); - ServerNetworkHandler.handleData(new FriendlyByteBuf(packet.getData().copy()), player); + ServerNetworkHandler.handleData(packet.getData(), player); ci.cancel(); } }