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.MinecartStepThe field for thecurrentSteprecord component.private final floatThe field for thepartialTicksInSteprecord component.private final NewMinecartBehavior.MinecartStepThe field for thepreviousSteprecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStepPartialTicks(float partialTicksInStep, NewMinecartBehavior.MinecartStep currentStep, NewMinecartBehavior.MinecartStep previousStep) Creates an instance of aStepPartialTicksrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrentSteprecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of thepartialTicksInSteprecord component.Returns the value of thepreviousSteprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
partialTicksInStep
private final float partialTicksInStepThe field for thepartialTicksInSteprecord component. -
currentStep
The field for thecurrentSteprecord component. -
previousStep
The field for thepreviousSteprecord component.
-
-
Constructor Details
-
StepPartialTicks
StepPartialTicks(float partialTicksInStep, NewMinecartBehavior.MinecartStep currentStep, NewMinecartBehavior.MinecartStep previousStep) Creates an instance of aStepPartialTicksrecord class.- Parameters:
partialTicksInStep- the value for thepartialTicksInSteprecord componentcurrentStep- the value for thecurrentSteprecord componentpreviousStep- the value for thepreviousSteprecord 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 thepartialTicksInSteprecord component.- Returns:
- the value of the
partialTicksInSteprecord component
-
currentStep
Returns the value of thecurrentSteprecord component.- Returns:
- the value of the
currentSteprecord component
-
previousStep
Returns the value of thepreviousSteprecord component.- Returns:
- the value of the
previousSteprecord component
-