Package net.minecraft.network
Class ConnectionProtocol.PacketSet<T extends PacketListener>
java.lang.Object
net.minecraft.network.ConnectionProtocol.PacketSet<T>
- Enclosing class:
- ConnectionProtocol
-
Field Summary
Modifier and TypeFieldDescriptionprivate BundlerInfo
private final List<Function<FriendlyByteBuf,
? extends Packet<T>>> private static final org.slf4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<P extends Packet<T>>
ConnectionProtocol.PacketSet<T>addPacket
(Class<P> p_178331_, Function<FriendlyByteBuf, P> p_178332_) Packet<?>
createPacket
(int p_178328_, FriendlyByteBuf p_178329_) int
void
listAllPackets
(Consumer<Class<? extends Packet<?>>> p_265213_) <P extends BundlePacket<T>>
ConnectionProtocol.PacketSet<T>
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
classToId
final it.unimi.dsi.fastutil.objects.Object2IntMap<Class<? extends Packet<T extends PacketListener>>> classToId -
idToDeserializer
private final List<Function<FriendlyByteBuf,? extends Packet<T extends PacketListener>>> idToDeserializer -
bundlerInfo
-
extraClasses
-
-
Constructor Details
-
PacketSet
PacketSet()
-
-
Method Details
-
addPacket
public <P extends Packet<T>> ConnectionProtocol.PacketSet<T> addPacket(Class<P> p_178331_, Function<FriendlyByteBuf, P> p_178332_) -
withBundlePacket
public <P extends BundlePacket<T>> ConnectionProtocol.PacketSet<T> withBundlePacket(Class<P> p_265034_, Function<Iterable<Packet<T>>, P> p_265591_) -
getId
-
createPacket
-
listAllPackets
-
bundlerInfo
-