Package net.minecraft.commands.execution
Record Class Frame
java.lang.Object
java.lang.Record
net.minecraft.commands.execution.Frame
public record Frame(int depth, CommandResultCallback returnValueConsumer, Frame.FrameControl frameControl)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thedepthrecord component.private final Frame.FrameControlThe field for theframeControlrecord component.private final CommandResultCallbackThe field for thereturnValueConsumerrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionFrame(int depth, CommandResultCallback returnValueConsumer, Frame.FrameControl frameControl) Creates an instance of aFramerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintdepth()Returns the value of thedepthrecord component.voiddiscard()final booleanIndicates whether some other object is "equal to" this one.Returns the value of theframeControlrecord component.final inthashCode()Returns a hash code value for this object.voidvoidreturnSuccess(int p_309616_) Returns the value of thereturnValueConsumerrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
depth
private final int depthThe field for thedepthrecord component. -
returnValueConsumer
The field for thereturnValueConsumerrecord component. -
frameControl
The field for theframeControlrecord component.
-
-
Constructor Details
-
Frame
Creates an instance of aFramerecord class.- Parameters:
depth- the value for thedepthrecord componentreturnValueConsumer- the value for thereturnValueConsumerrecord componentframeControl- the value for theframeControlrecord component
-
-
Method Details
-
returnSuccess
public void returnSuccess(int p_309616_) -
returnFailure
public void returnFailure() -
discard
public void discard() -
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 '=='. -
depth
public int depth()Returns the value of thedepthrecord component.- Returns:
- the value of the
depthrecord component
-
returnValueConsumer
Returns the value of thereturnValueConsumerrecord component.- Returns:
- the value of the
returnValueConsumerrecord component
-
frameControl
Returns the value of theframeControlrecord component.- Returns:
- the value of the
frameControlrecord component
-