Record Class BlockUsePrediction
java.lang.Object
java.lang.Record
net.raphimc.viabedrock.api.model.BlockUsePrediction
public record BlockUsePrediction(int sequence, BlockUsePrediction.Result result, Position3f cursor, boolean airAllowed)
extends Record
Local result matched to the concluding Java prediction sequence.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final com.viaversion.viaversion.api.type.Type<BlockUsePrediction> static final Stringstatic final com.viaversion.viaversion.api.type.Type<BlockUsePrediction> -
Constructor Summary
ConstructorsConstructorDescriptionBlockUsePrediction(int sequence, BlockUsePrediction.Result result, Position3f cursor) BlockUsePrediction(int sequence, BlockUsePrediction.Result result, Position3f cursor, boolean airAllowed) Creates an instance of aBlockUsePredictionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theairAllowedrecord component.cursor()Returns the value of thecursorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.result()Returns the value of theresultrecord component.intsequence()Returns the value of thesequencerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CHANNEL
- See Also:
-
AIR_CHANNEL
- See Also:
-
TYPE
-
AIR_TYPE
-
-
Constructor Details
-
BlockUsePrediction
-
BlockUsePrediction
public BlockUsePrediction(int sequence, BlockUsePrediction.Result result, Position3f cursor, boolean airAllowed) Creates an instance of aBlockUsePredictionrecord class.- Parameters:
sequence- the value for thesequencerecord componentresult- the value for theresultrecord componentcursor- the value for thecursorrecord componentairAllowed- the value for theairAllowedrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
sequence
public int sequence()Returns the value of thesequencerecord component.- Returns:
- the value of the
sequencerecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
cursor
Returns the value of thecursorrecord component.- Returns:
- the value of the
cursorrecord component
-
airAllowed
public boolean airAllowed()Returns the value of theairAllowedrecord component.- Returns:
- the value of the
airAllowedrecord component
-