Package net.minecraft.gametest.framework
Record Class TestEnvironmentDefinition.TimeOfDay
java.lang.Object
java.lang.Record
net.minecraft.gametest.framework.TestEnvironmentDefinition.TimeOfDay
- All Implemented Interfaces:
TestEnvironmentDefinition
- Enclosing interface:
TestEnvironmentDefinition
public static record TestEnvironmentDefinition.TimeOfDay(int time)
extends Record
implements TestEnvironmentDefinition
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.gametest.framework.TestEnvironmentDefinition
TestEnvironmentDefinition.AllOf, TestEnvironmentDefinition.Functions, TestEnvironmentDefinition.SetGameRules, TestEnvironmentDefinition.TimeOfDay, TestEnvironmentDefinition.Weather
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<TestEnvironmentDefinition.TimeOfDay> private final int
The field for thetime
record component.Fields inherited from interface net.minecraft.gametest.framework.TestEnvironmentDefinition
DIRECT_CODEC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec
<TestEnvironmentDefinition.TimeOfDay> codec()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.void
setup
(ServerLevel p_397305_) int
time()
Returns the value of thetime
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.gametest.framework.TestEnvironmentDefinition
teardown
-
Field Details
-
time
private final int timeThe field for thetime
record component. -
CODEC
-
-
Constructor Details
-
TimeOfDay
public TimeOfDay(int time) Creates an instance of aTimeOfDay
record class.- Parameters:
time
- the value for thetime
record component
-
-
Method Details
-
setup
- Specified by:
setup
in interfaceTestEnvironmentDefinition
-
codec
- Specified by:
codec
in interfaceTestEnvironmentDefinition
-
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. All components in this record class are compared with '=='. -
time
public int time()Returns the value of thetime
record component.- Returns:
- the value of the
time
record component
-