mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-14 19:25:23 -05:00
Fix incorrect internal method names in ServerNetworkingImpl (#3349)
No functional change.
This commit is contained in:
parent
d9a2869ba3
commit
b18afef34a
3 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 <T extends FabricPacket> Packet<ClientCommonPacketListener> createS2CPacket(T packet) {
|
||||
return ServerNetworkingImpl.createC2SPacket(packet);
|
||||
return ServerNetworkingImpl.createS2CPacket(packet);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -54,16 +54,16 @@ public final class ServerNetworkingImpl {
|
|||
return (ServerConfigurationNetworkAddon) ((NetworkHandlerExtensions) handler).getAddon();
|
||||
}
|
||||
|
||||
public static Packet<ClientCommonPacketListener> createC2SPacket(Identifier channel, PacketByteBuf buf) {
|
||||
public static Packet<ClientCommonPacketListener> createS2CPacket(Identifier channel, PacketByteBuf buf) {
|
||||
return new CustomPayloadS2CPacket(new PacketByteBufPayload(channel, buf));
|
||||
}
|
||||
|
||||
public static Packet<ClientCommonPacketListener> createC2SPacket(FabricPacket packet) {
|
||||
public static Packet<ClientCommonPacketListener> 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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue