Package net.minecraft.network.protocol
Interface BundlerInfo
public interface BundlerInfo
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends PacketListener,P extends BundlePacket<? super T>>
BundlerInfocreateForPacket(PacketType<P> type, Function<Iterable<Packet<? super T>>, P> bundler, BundleDelimiterPacket<? super T> packet) startPacketBundling(Packet<?> packet) voidunbundlePacket(Packet<?> packet, Consumer<Packet<?>> consumer) Deprecated.default voidunbundlePacket(Packet<?> packet, Consumer<Packet<?>> consumer, io.netty.channel.ChannelHandlerContext context) Unwrap and flattens a bundle packet.
-
Field Details
-
BUNDLE_SIZE_LIMIT
static final int BUNDLE_SIZE_LIMIT- See Also:
-
-
Method Details
-
createForPacket
static <T extends PacketListener,P extends BundlePacket<? super T>> BundlerInfo createForPacket(PacketType<P> type, Function<Iterable<Packet<? super T>>, P> bundler, BundleDelimiterPacket<? super T> packet) -
unbundlePacket
Deprecated.UseunbundlePacket(Packet, Consumer, io.netty.channel.ChannelHandlerContext)instead, as it supports packet filtering and is more efficient. -
unbundlePacket
default void unbundlePacket(Packet<?> packet, Consumer<Packet<?>> consumer, io.netty.channel.ChannelHandlerContext context) Unwrap and flattens a bundle packet. Then sends the packets contained in the bundle, bracketing them in delimiter packets if need be.- Parameters:
packet- The bundle packet to write.consumer- The packet sender.context- The network context.
-
startPacketBundling
-
unbundlePacket(Packet, Consumer, io.netty.channel.ChannelHandlerContext)instead, as it supports packet filtering and is more efficient.