Record Class NewMinecartBehavior.StepPartialTicks
java.lang.Object
java.lang.Record
net.minecraft.world.entity.vehicle.NewMinecartBehavior.StepPartialTicks
- Enclosing class:
NewMinecartBehavior
static record NewMinecartBehavior.StepPartialTicks(float partialTicksInStep, NewMinecartBehavior.MinecartStep currentStep, NewMinecartBehavior.MinecartStep previousStep)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final NewMinecartBehavior.MinecartStep
The field for thecurrentStep
record component.private final float
The field for thepartialTicksInStep
record component.private final NewMinecartBehavior.MinecartStep
The field for thepreviousStep
record component. -
Constructor Summary
ConstructorsConstructorDescriptionStepPartialTicks
(float partialTicksInStep, NewMinecartBehavior.MinecartStep currentStep, NewMinecartBehavior.MinecartStep previousStep) Creates an instance of aStepPartialTicks
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrentStep
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.float
Returns the value of thepartialTicksInStep
record component.Returns the value of thepreviousStep
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
partialTicksInStep
private final float partialTicksInStepThe field for thepartialTicksInStep
record component. -
currentStep
The field for thecurrentStep
record component. -
previousStep
The field for thepreviousStep
record component.
-
-
Constructor Details
-
StepPartialTicks
StepPartialTicks(float partialTicksInStep, NewMinecartBehavior.MinecartStep currentStep, NewMinecartBehavior.MinecartStep previousStep) Creates an instance of aStepPartialTicks
record class.- Parameters:
partialTicksInStep
- the value for thepartialTicksInStep
record componentcurrentStep
- the value for thecurrentStep
record componentpreviousStep
- the value for thepreviousStep
record component
-
-
Method Details
-
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 '=='. -
partialTicksInStep
public float partialTicksInStep()Returns the value of thepartialTicksInStep
record component.- Returns:
- the value of the
partialTicksInStep
record component
-
currentStep
Returns the value of thecurrentStep
record component.- Returns:
- the value of the
currentStep
record component
-
previousStep
Returns the value of thepreviousStep
record component.- Returns:
- the value of the
previousStep
record component
-