Package net.minecraft.packettrans
Class PacketTranslator.TranslatorBuilder
- java.lang.Object
-
- net.minecraft.packettrans.PacketTranslator.TranslatorBuilder
-
- Enclosing class:
- PacketTranslator
public static final class PacketTranslator.TranslatorBuilder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.BiConsumer<Packet,java.util.List<Packet>>
DROPPING_TRANSLATOR
static java.util.function.BiConsumer<Packet,java.util.List<Packet>>
NO_OP_TRANSLATOR
-
Constructor Summary
Constructors Constructor Description TranslatorBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dropPacketC2S(int... ids)
void
dropPacketS2C(int... ids)
java.util.function.BiConsumer<Packet,java.util.List<Packet>>[]
getC2S()
java.util.function.BiConsumer<Packet,java.util.List<Packet>>[]
getS2C()
void
itemsNotPresent(int... ids)
void
registerPacketClass(java.lang.Class<? extends Packet> clazz, int id)
void
setActualProtocolVersion(int actualProtocolVersion)
<T extends Packet>
voidtranslatePacketC2S(java.lang.Class<T> inClass, java.util.function.Function<T,Packet> constructor, int id)
void
translatePacketC2S(java.util.function.BiConsumer<Packet,java.util.List<Packet>> translator, int... ids)
<T extends Packet>
voidtranslatePacketS2C(java.lang.Class<T> inClass, java.util.function.Function<T,Packet> constructor, int id)
void
translatePacketS2C(java.util.function.BiConsumer<Packet,java.util.List<Packet>> translator, int... ids)
-
-
-
Method Detail
-
dropPacketC2S
public void dropPacketC2S(int... ids)
-
dropPacketS2C
public void dropPacketS2C(int... ids)
-
translatePacketC2S
public void translatePacketC2S(java.util.function.BiConsumer<Packet,java.util.List<Packet>> translator, int... ids)
-
translatePacketC2S
public <T extends Packet> void translatePacketC2S(java.lang.Class<T> inClass, java.util.function.Function<T,Packet> constructor, int id)
-
translatePacketS2C
public void translatePacketS2C(java.util.function.BiConsumer<Packet,java.util.List<Packet>> translator, int... ids)
-
translatePacketS2C
public <T extends Packet> void translatePacketS2C(java.lang.Class<T> inClass, java.util.function.Function<T,Packet> constructor, int id)
-
registerPacketClass
public void registerPacketClass(java.lang.Class<? extends Packet> clazz, int id)
-
itemsNotPresent
public void itemsNotPresent(int... ids)
-
setActualProtocolVersion
public void setActualProtocolVersion(int actualProtocolVersion)
-
-