23 lines
390 B
Java
23 lines
390 B
Java
package net.minecraft.network.protocol;
|
|
|
|
/**
|
|
* The direction of packets.
|
|
*/
|
|
public enum PacketFlow {
|
|
SERVERBOUND("serverbound"),
|
|
CLIENTBOUND("clientbound");
|
|
|
|
private final String id;
|
|
|
|
private PacketFlow(final String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public PacketFlow getOpposite() {
|
|
return this == CLIENTBOUND ? SERVERBOUND : CLIENTBOUND;
|
|
}
|
|
|
|
public String id() {
|
|
return this.id;
|
|
}
|
|
}
|