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(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<CommandNode<S>> nodeToId, ClientboundCommandsPacket.NodeInspector<S> inspector) private static <S> ClientboundCommandsPacket.EntrycreateEntry(CommandNode<S> node, ClientboundCommandsPacket.NodeInspector<S> inspector, it.unimi.dsi.fastutil.objects.Object2IntMap<CommandNode<S>> ids) private static <S> it.unimi.dsi.fastutil.objects.Object2IntMap<CommandNode<S>> enumerateNodes(RootCommandNode<S> root) <S> RootCommandNode<S> getRoot(CommandBuildContext context, ClientboundCommandsPacket.NodeBuilder<S> builder) voidhandle(ClientGamePacketListener listener) 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) 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(RootCommandNode<S> root, ClientboundCommandsPacket.NodeInspector<S> inspector) -
ClientboundCommandsPacket
-
-
Method Details
-
write
-
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<CommandNode<S>> enumerateNodes(RootCommandNode<S> root) -
createEntries
private static <S> List<ClientboundCommandsPacket.Entry> createEntries(it.unimi.dsi.fastutil.objects.Object2IntMap<CommandNode<S>> nodeToId, ClientboundCommandsPacket.NodeInspector<S> inspector) -
readNode
-
read
-
createEntry
private static <S> ClientboundCommandsPacket.Entry createEntry(CommandNode<S> node, ClientboundCommandsPacket.NodeInspector<S> inspector, it.unimi.dsi.fastutil.objects.Object2IntMap<CommandNode<S>> ids) -
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
getRoot
public <S> RootCommandNode<S> getRoot(CommandBuildContext context, ClientboundCommandsPacket.NodeBuilder<S> builder)
-