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 8460f224a..9e9819734 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 final class ServerConfigurationNetworking { 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 final class ServerConfigurationNetworking { 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 c716d6a19..9ac7ce58d 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 final class ServerPlayNetworking { 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 final class ServerPlayNetworking { * @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 ffdfafa2e..2a3c88e59 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 final class ServerNetworkingImpl { 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); } }