Record Class TestEnvironmentDefinition.ClockTime
java.lang.Object
java.lang.Record
net.minecraft.gametest.framework.TestEnvironmentDefinition.ClockTime
- All Implemented Interfaces:
TestEnvironmentDefinition<Long>
- Enclosing interface:
TestEnvironmentDefinition<SavedDataType>
public static record TestEnvironmentDefinition.ClockTime(Holder<WorldClock> clock, int time)
extends Record
implements TestEnvironmentDefinition<Long>
-
Nested Class Summary
Nested classes/interfaces inherited from interface TestEnvironmentDefinition
TestEnvironmentDefinition.Activation<T>, TestEnvironmentDefinition.AllOf, TestEnvironmentDefinition.ClockTime, TestEnvironmentDefinition.Functions, TestEnvironmentDefinition.SetGameRules, TestEnvironmentDefinition.Weather -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Holder<WorldClock> The field for theclockrecord component.static final com.mojang.serialization.MapCodec<TestEnvironmentDefinition.ClockTime> private final intThe field for thetimerecord component.Fields inherited from interface TestEnvironmentDefinition
DIRECT_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionClockTime(Holder<WorldClock> clock, int time) Creates an instance of aClockTimerecord class. -
Method Summary
Modifier and TypeMethodDescriptionclock()Returns the value of theclockrecord component.com.mojang.serialization.MapCodec<TestEnvironmentDefinition.ClockTime> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.setup(ServerLevel level) voidteardown(ServerLevel level, Long saveData) inttime()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
clock
The field for theclockrecord component. -
time
private final int timeThe field for thetimerecord component. -
CODEC
-
-
Constructor Details
-
ClockTime
Creates an instance of aClockTimerecord class.- Parameters:
clock- the value for theclockrecord componenttime- the value for thetimerecord component
-
-
Method Details
-
setup
- Specified by:
setupin interfaceTestEnvironmentDefinition<Long>
-
teardown
- Specified by:
teardownin interfaceTestEnvironmentDefinition<Long>
-
codec
- Specified by:
codecin interfaceTestEnvironmentDefinition<Long>
-
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. -
clock
Returns the value of theclockrecord component.- Returns:
- the value of the
clockrecord component
-
time
public int time()Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-