Record Class TimelineImpl
java.lang.Object
java.lang.Record
net.minestom.server.world.timeline.TimelineImpl
- All Implemented Interfaces:
Timeline
public record TimelineImpl(@Nullable Integer periodTicks, Map<EnvironmentAttribute<?>, Timeline.Track<?,?>> tracks)
extends Record
implements Timeline
-
Nested Class Summary
Nested classes/interfaces inherited from interface Timeline
Timeline.Builder, Timeline.Keyframe<T>, Timeline.Track<T,Arg> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RegistryKey<Timeline> static final RegistryKey<Timeline> static final RegistryKey<Timeline> static final RegistryKey<Timeline> Fields inherited from interface Timeline
CODEC, NETWORK_TYPE, REGISTRY_CODEC, TRACKS_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionTimelineImpl(@Nullable Integer periodTicks, Map<EnvironmentAttribute<?>, Timeline.Track<?, ?>> tracks) Creates an instance of aTimelineImplrecord 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.Returns the value of theperiodTicksrecord component.final StringtoString()Returns a string representation of this record class.Map<EnvironmentAttribute<?>, Timeline.Track<?, ?>> tracks()Returns the value of thetracksrecord component.
-
Field Details
-
VILLAGER_SCHEDULE
-
EARLY_GAME
-
DAY
-
MOON
-
-
Constructor Details
-
TimelineImpl
public TimelineImpl(@Nullable @Nullable Integer periodTicks, Map<EnvironmentAttribute<?>, Timeline.Track<?, ?>> tracks) Creates an instance of aTimelineImplrecord class.- Parameters:
periodTicks- the value for theperiodTicksrecord componenttracks- the value for thetracksrecord 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 withObjects::equals(Object,Object). -
periodTicks
Returns the value of theperiodTicksrecord component.- Specified by:
periodTicksin interfaceTimeline- Returns:
- the value of the
periodTicksrecord component
-
tracks
Returns the value of thetracksrecord component.
-