Record Class ClockNetworkState
java.lang.Object
java.lang.Record
net.minecraft.world.clock.ClockNetworkState
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for thepartialTickrecord component.private final floatThe field for theraterecord component.static final StreamCodec<io.netty.buffer.ByteBuf, ClockNetworkState> private final longThe field for thetotalTicksrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClockNetworkState(long totalTicks, float partialTick, float rate) Creates an instance of aClockNetworkStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of thepartialTickrecord component.floatrate()Returns the value of theraterecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalTicksrecord component.
-
Field Details
-
totalTicks
private final long totalTicksThe field for thetotalTicksrecord component. -
partialTick
private final float partialTickThe field for thepartialTickrecord component. -
rate
private final float rateThe field for theraterecord component. -
STREAM_CODEC
-
-
Constructor Details
-
ClockNetworkState
public ClockNetworkState(long totalTicks, float partialTick, float rate) Creates an instance of aClockNetworkStaterecord class.- Parameters:
totalTicks- the value for thetotalTicksrecord componentpartialTick- the value for thepartialTickrecord componentrate- the value for theraterecord 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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
totalTicks
public long totalTicks()Returns the value of thetotalTicksrecord component.- Returns:
- the value of the
totalTicksrecord component
-
partialTick
public float partialTick()Returns the value of thepartialTickrecord component.- Returns:
- the value of the
partialTickrecord component
-
rate
public float rate()Returns the value of theraterecord component.- Returns:
- the value of the
raterecord component
-