Class ClientboundCommandsPacket
java.lang.Object
net.minecraft.network.protocol.game.ClientboundCommandsPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final recordprivate static final recordprivate static final recordstatic interfacestatic interfaceprivate static classprivate static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ClientboundCommandsPacket.Entry> private static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate final intstatic final StreamCodec<FriendlyByteBuf, ClientboundCommandsPacket> private static final byteprivate static final byteprivate static final byte -
Constructor Summary
ConstructorsModifierConstructorDescription<S>ClientboundCommandsPacket(com.mojang.brigadier.tree.RootCommandNode<S> root, ClientboundCommandsPacket.NodeInspector<S> inspector) private -
Method Summary
Modifier and TypeMethodDescriptionprivate static <S> List<ClientboundCommandsPacket.Entry> createEntries(it.unimi.dsi.fastutil.objects.Object2IntMap<com.mojang.brigadier.tree.CommandNode<S>> nodeToId, ClientboundCommandsPacket.NodeInspector<S> inspector) private static <S> ClientboundCommandsPacket.EntrycreateEntry(com.mojang.brigadier.tree.CommandNode<S> node, ClientboundCommandsPacket.NodeInspector<S> inspector, it.unimi.dsi.fastutil.objects.Object2IntMap<com.mojang.brigadier.tree.CommandNode<S>> ids) private static <S> it.unimi.dsi.fastutil.objects.Object2IntMap<com.mojang.brigadier.tree.CommandNode<S>> enumerateNodes(com.mojang.brigadier.tree.RootCommandNode<S> root) <S> com.mojang.brigadier.tree.RootCommandNode<S> getRoot(CommandBuildContext context, ClientboundCommandsPacket.NodeBuilder<S> builder) voidhandle(ClientGamePacketListener listener) Passes this Packet on to the NetHandler for processing.private static @Nullable ClientboundCommandsPacket.NodeStubread(FriendlyByteBuf input, byte flags) private static ClientboundCommandsPacket.EntryreadNode(FriendlyByteBuf input) type()private static voidprivate static voidvalidateEntries(List<ClientboundCommandsPacket.Entry> entries, BiPredicate<ClientboundCommandsPacket.Entry, it.unimi.dsi.fastutil.ints.IntSet> validator) private voidwrite(FriendlyByteBuf output) Writes the raw packet data to the data stream.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
STREAM_CODEC
-
MASK_TYPE
private static final byte MASK_TYPE- See Also:
-
FLAG_EXECUTABLE
private static final byte FLAG_EXECUTABLE- See Also:
-
FLAG_REDIRECT
private static final byte FLAG_REDIRECT- See Also:
-
FLAG_CUSTOM_SUGGESTIONS
private static final byte FLAG_CUSTOM_SUGGESTIONS- See Also:
-
FLAG_RESTRICTED
private static final byte FLAG_RESTRICTED- See Also:
-
TYPE_ROOT
private static final byte TYPE_ROOT- See Also:
-
TYPE_LITERAL
private static final byte TYPE_LITERAL- See Also:
-
TYPE_ARGUMENT
private static final byte TYPE_ARGUMENT- See Also:
-
rootIndex
private final int rootIndex -
entries
-
-
Constructor Details
-
ClientboundCommandsPacket
public <S> ClientboundCommandsPacket(com.mojang.brigadier.tree.RootCommandNode<S> root, ClientboundCommandsPacket.NodeInspector<S> inspector) -
ClientboundCommandsPacket
-
-
Method Details
-
write
Writes the raw packet data to the data stream. -
validateEntries
private static void validateEntries(List<ClientboundCommandsPacket.Entry> entries, BiPredicate<ClientboundCommandsPacket.Entry, it.unimi.dsi.fastutil.ints.IntSet> validator) -
validateEntries
-
enumerateNodes
private static <S> it.unimi.dsi.fastutil.objects.Object2IntMap<com.mojang.brigadier.tree.CommandNode<S>> enumerateNodes(com.mojang.brigadier.tree.RootCommandNode<S> root) -
createEntries
private static <S> List<ClientboundCommandsPacket.Entry> createEntries(it.unimi.dsi.fastutil.objects.Object2IntMap<com.mojang.brigadier.tree.CommandNode<S>> nodeToId, ClientboundCommandsPacket.NodeInspector<S> inspector) -
readNode
-
read
-
createEntry
private static <S> ClientboundCommandsPacket.Entry createEntry(com.mojang.brigadier.tree.CommandNode<S> node, ClientboundCommandsPacket.NodeInspector<S> inspector, it.unimi.dsi.fastutil.objects.Object2IntMap<com.mojang.brigadier.tree.CommandNode<S>> ids) -
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
getRoot
public <S> com.mojang.brigadier.tree.RootCommandNode<S> getRoot(CommandBuildContext context, ClientboundCommandsPacket.NodeBuilder<S> builder)
-