diff --git a/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/api/networking/v1/ServerConfigurationNetworking.java b/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/api/networking/v1/ServerConfigurationNetworking.java index 8460f224a7..9e98197347 100644 --- a/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/api/networking/v1/ServerConfigurationNetworking.java +++ b/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/api/networking/v1/ServerConfigurationNetworking.java @@ -301,7 +301,7 @@ public static Packet createS2CPacket(Identifier chan Objects.requireNonNull(channelName, "Channel cannot be null"); Objects.requireNonNull(buf, "Buf cannot be null"); - return ServerNetworkingImpl.createC2SPacket(channelName, buf); + return ServerNetworkingImpl.createS2CPacket(channelName, buf); } /** @@ -314,7 +314,7 @@ public static Packet create Objects.requireNonNull(packet, "Packet cannot be null"); Objects.requireNonNull(packet.getType(), "Packet#getType cannot return null"); - return ServerNetworkingImpl.createC2SPacket(packet); + return ServerNetworkingImpl.createS2CPacket(packet); } /** diff --git a/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/api/networking/v1/ServerPlayNetworking.java b/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/api/networking/v1/ServerPlayNetworking.java index c716d6a196..9ac7ce58da 100644 --- a/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/api/networking/v1/ServerPlayNetworking.java +++ b/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/api/networking/v1/ServerPlayNetworking.java @@ -386,7 +386,7 @@ public static Packet createS2CPacket(Identifier chan Objects.requireNonNull(channelName, "Channel cannot be null"); Objects.requireNonNull(buf, "Buf cannot be null"); - return ServerNetworkingImpl.createC2SPacket(channelName, buf); + return ServerNetworkingImpl.createS2CPacket(channelName, buf); } /** @@ -396,7 +396,7 @@ public static Packet createS2CPacket(Identifier chan * @return a new packet */ public static Packet createS2CPacket(T packet) { - return ServerNetworkingImpl.createC2SPacket(packet); + return ServerNetworkingImpl.createS2CPacket(packet); } /** diff --git a/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/impl/networking/server/ServerNetworkingImpl.java b/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/impl/networking/server/ServerNetworkingImpl.java index ffdfafa2e4..2a3c88e596 100644 --- a/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/impl/networking/server/ServerNetworkingImpl.java +++ b/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/impl/networking/server/ServerNetworkingImpl.java @@ -54,16 +54,16 @@ public static ServerConfigurationNetworkAddon getAddon(ServerConfigurationNetwor return (ServerConfigurationNetworkAddon) ((NetworkHandlerExtensions) handler).getAddon(); } - public static Packet createC2SPacket(Identifier channel, PacketByteBuf buf) { + public static Packet createS2CPacket(Identifier channel, PacketByteBuf buf) { return new CustomPayloadS2CPacket(new PacketByteBufPayload(channel, buf)); } - public static Packet createC2SPacket(FabricPacket packet) { + public static Packet createS2CPacket(FabricPacket packet) { Objects.requireNonNull(packet, "Packet cannot be null"); Objects.requireNonNull(packet.getType(), "Packet#getType cannot return null"); PacketByteBuf buf = PacketByteBufs.create(); packet.write(buf); - return createC2SPacket(packet.getType().getId(), buf); + return createS2CPacket(packet.getType().getId(), buf); } }