Package net.minecraft.packettrans
Class PacketTranslator
- java.lang.Object
-
- net.minecraft.packettrans.PacketTranslator
-
public final class PacketTranslator extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PacketTranslator.TranslatorBuilder
-
Field Summary
Fields Modifier and Type Field Description static int
LATEST_PROTOCOL
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getActualProtocolVersion(int protocol)
static Packet
getNewPacket(int protocol, int packetId)
static boolean
isItemPresent(int protocol, int itemId)
static void
registerProtocol(int protocol, java.util.function.Consumer<PacketTranslator.TranslatorBuilder> action)
static void
registerProtocol(int protocol, PacketTranslator.TranslatorBuilder builder)
static java.util.List<Packet>
translateC2S(java.util.List<Packet> packets, int dest)
static java.util.List<Packet>
translateC2S(Packet packet, int dest)
static java.util.List<Packet>
translateS2C(java.util.List<Packet> packets, int from)
static java.util.List<Packet>
translateS2C(Packet packet, int from)
-
-
-
Field Detail
-
LATEST_PROTOCOL
public static final int LATEST_PROTOCOL
- See Also:
- Constant Field Values
-
-
Method Detail
-
registerProtocol
public static void registerProtocol(int protocol, java.util.function.Consumer<PacketTranslator.TranslatorBuilder> action)
-
registerProtocol
public static void registerProtocol(int protocol, PacketTranslator.TranslatorBuilder builder)
-
translateC2S
public static java.util.List<Packet> translateC2S(java.util.List<Packet> packets, int dest)
-
translateS2C
public static java.util.List<Packet> translateS2C(java.util.List<Packet> packets, int from)
-
getNewPacket
public static Packet getNewPacket(int protocol, int packetId)
-
isItemPresent
public static boolean isItemPresent(int protocol, int itemId)
-
getActualProtocolVersion
public static int getActualProtocolVersion(int protocol)
-
-