31 lines
2.0 KiB
Java
31 lines
2.0 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* io.netty.buffer.ByteBuf
|
|
*/
|
|
package net.minecraft.network.protocol.status;
|
|
|
|
import io.netty.buffer.ByteBuf;
|
|
import net.minecraft.network.ConnectionProtocol;
|
|
import net.minecraft.network.FriendlyByteBuf;
|
|
import net.minecraft.network.ProtocolInfo;
|
|
import net.minecraft.network.protocol.ProtocolInfoBuilder;
|
|
import net.minecraft.network.protocol.SimpleUnboundProtocol;
|
|
import net.minecraft.network.protocol.ping.ClientboundPongResponsePacket;
|
|
import net.minecraft.network.protocol.ping.PingPacketTypes;
|
|
import net.minecraft.network.protocol.ping.ServerboundPingRequestPacket;
|
|
import net.minecraft.network.protocol.status.ClientStatusPacketListener;
|
|
import net.minecraft.network.protocol.status.ClientboundStatusResponsePacket;
|
|
import net.minecraft.network.protocol.status.ServerStatusPacketListener;
|
|
import net.minecraft.network.protocol.status.ServerboundStatusRequestPacket;
|
|
import net.minecraft.network.protocol.status.StatusPacketTypes;
|
|
|
|
public class StatusProtocols {
|
|
public static final SimpleUnboundProtocol<ServerStatusPacketListener, ByteBuf> SERVERBOUND_TEMPLATE = ProtocolInfoBuilder.serverboundProtocol(ConnectionProtocol.STATUS, builder -> builder.addPacket(StatusPacketTypes.SERVERBOUND_STATUS_REQUEST, ServerboundStatusRequestPacket.STREAM_CODEC).addPacket(PingPacketTypes.SERVERBOUND_PING_REQUEST, ServerboundPingRequestPacket.STREAM_CODEC));
|
|
public static final ProtocolInfo<ServerStatusPacketListener> SERVERBOUND = SERVERBOUND_TEMPLATE.bind(e -> e);
|
|
public static final SimpleUnboundProtocol<ClientStatusPacketListener, FriendlyByteBuf> CLIENTBOUND_TEMPLATE = ProtocolInfoBuilder.clientboundProtocol(ConnectionProtocol.STATUS, builder -> builder.addPacket(StatusPacketTypes.CLIENTBOUND_STATUS_RESPONSE, ClientboundStatusResponsePacket.STREAM_CODEC).addPacket(PingPacketTypes.CLIENTBOUND_PONG_RESPONSE, ClientboundPongResponsePacket.STREAM_CODEC));
|
|
public static final ProtocolInfo<ClientStatusPacketListener> CLIENTBOUND = CLIENTBOUND_TEMPLATE.bind(FriendlyByteBuf::new);
|
|
}
|
|
|