Class ClientboundCommandsPacket
java.lang.Object
net.minecraft.network.protocol.game.ClientboundCommandsPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final record(package private) static final record(package private) static final recordstatic interfacestatic interface(package private) static class(package private) 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
ConstructorsModifierConstructorDescriptionClientboundCommandsPacket(com.mojang.brigadier.tree.RootCommandNode<S> pRoot, ClientboundCommandsPacket.NodeInspector<S> pNodeInspector) privateClientboundCommandsPacket(FriendlyByteBuf pBuffer) -
Method Summary
Modifier and TypeMethodDescriptionprivate static <S> List<ClientboundCommandsPacket.Entry> createEntries(it.unimi.dsi.fastutil.objects.Object2IntMap<com.mojang.brigadier.tree.CommandNode<S>> pNodes, ClientboundCommandsPacket.NodeInspector<S> pNodeInspector) private static <S> ClientboundCommandsPacket.EntrycreateEntry(com.mojang.brigadier.tree.CommandNode<S> pNode, ClientboundCommandsPacket.NodeInspector<S> pNodeInspector, it.unimi.dsi.fastutil.objects.Object2IntMap<com.mojang.brigadier.tree.CommandNode<S>> pNodes) private static <S> it.unimi.dsi.fastutil.objects.Object2IntMap<com.mojang.brigadier.tree.CommandNode<S>> enumerateNodes(com.mojang.brigadier.tree.RootCommandNode<S> pRootNode) <S> com.mojang.brigadier.tree.RootCommandNode<S> getRoot(CommandBuildContext pContext, ClientboundCommandsPacket.NodeBuilder<S> pNodeBuilder) voidhandle(ClientGamePacketListener pHandler) Passes this Packet on to the NetHandler for processing.private static ClientboundCommandsPacket.NodeStubread(FriendlyByteBuf pBuffer, byte pFlags) private static ClientboundCommandsPacket.EntryreadNode(FriendlyByteBuf pBuffer) type()private static voidvalidateEntries(List<ClientboundCommandsPacket.Entry> pEntries) private static voidvalidateEntries(List<ClientboundCommandsPacket.Entry> pEntries, BiPredicate<ClientboundCommandsPacket.Entry, it.unimi.dsi.fastutil.ints.IntSet> pValidator) private voidwrite(FriendlyByteBuf pBuffer) Writes the raw packet data to the data stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.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 ClientboundCommandsPacket(com.mojang.brigadier.tree.RootCommandNode<S> pRoot, ClientboundCommandsPacket.NodeInspector<S> pNodeInspector) -
ClientboundCommandsPacket
-
-
Method Details
-
write
Writes the raw packet data to the data stream. -
validateEntries
private static void validateEntries(List<ClientboundCommandsPacket.Entry> pEntries, BiPredicate<ClientboundCommandsPacket.Entry, it.unimi.dsi.fastutil.ints.IntSet> pValidator) -
validateEntries
-
enumerateNodes
private static <S> it.unimi.dsi.fastutil.objects.Object2IntMap<com.mojang.brigadier.tree.CommandNode<S>> enumerateNodes(com.mojang.brigadier.tree.RootCommandNode<S> pRootNode) -
createEntries
private static <S> List<ClientboundCommandsPacket.Entry> createEntries(it.unimi.dsi.fastutil.objects.Object2IntMap<com.mojang.brigadier.tree.CommandNode<S>> pNodes, ClientboundCommandsPacket.NodeInspector<S> pNodeInspector) -
readNode
-
read
@Nullable private static ClientboundCommandsPacket.NodeStub read(FriendlyByteBuf pBuffer, byte pFlags) -
createEntry
private static <S> ClientboundCommandsPacket.Entry createEntry(com.mojang.brigadier.tree.CommandNode<S> pNode, ClientboundCommandsPacket.NodeInspector<S> pNodeInspector, it.unimi.dsi.fastutil.objects.Object2IntMap<com.mojang.brigadier.tree.CommandNode<S>> pNodes) -
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 pContext, ClientboundCommandsPacket.NodeBuilder<S> pNodeBuilder)
-