Record Class ClientboundCommandsPacket.Entry
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundCommandsPacket.Entry
- Enclosing class:
ClientboundCommandsPacket
static record ClientboundCommandsPacket.Entry(@Nullable ClientboundCommandsPacket.NodeStub stub, int flags, int redirect, int[] children)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int[]The field for thechildrenrecord component.private final intThe field for theflagsrecord component.private final intThe field for theredirectrecord component.private final ClientboundCommandsPacket.NodeStubThe field for thestubrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEntry(ClientboundCommandsPacket.NodeStub stub, int flags, int redirect, int[] children) Creates an instance of aEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanBuild(it.unimi.dsi.fastutil.ints.IntSet pChildren) booleancanResolve(it.unimi.dsi.fastutil.ints.IntSet pChildren) int[]children()Returns the value of thechildrenrecord component.final booleanIndicates whether some other object is "equal to" this one.intflags()Returns the value of theflagsrecord component.final inthashCode()Returns a hash code value for this object.intredirect()Returns the value of theredirectrecord component.stub()Returns the value of thestubrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf pBuffer)
-
Field Details
-
stub
The field for thestubrecord component. -
flags
private final int flagsThe field for theflagsrecord component. -
redirect
private final int redirectThe field for theredirectrecord component. -
children
private final int[] childrenThe field for thechildrenrecord component.
-
-
Constructor Details
-
Entry
Entry(@Nullable ClientboundCommandsPacket.NodeStub stub, int flags, int redirect, int[] children) Creates an instance of aEntryrecord class.- Parameters:
stub- the value for thestubrecord componentflags- the value for theflagsrecord componentredirect- the value for theredirectrecord componentchildren- the value for thechildrenrecord component
-
-
Method Details
-
write
-
canBuild
public boolean canBuild(it.unimi.dsi.fastutil.ints.IntSet pChildren) -
canResolve
public boolean canResolve(it.unimi.dsi.fastutil.ints.IntSet pChildren) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
stub
Returns the value of thestubrecord component.- Returns:
- the value of the
stubrecord component
-
flags
public int flags()Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-
redirect
public int redirect()Returns the value of theredirectrecord component.- Returns:
- the value of the
redirectrecord component
-
children
public int[] children()Returns the value of thechildrenrecord component.- Returns:
- the value of the
childrenrecord component
-