Record Class TrialSpawner.FullConfig
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.entity.trialspawner.TrialSpawner.FullConfig
- Enclosing class:
TrialSpawner
public static record TrialSpawner.FullConfig(Holder<TrialSpawnerConfig> normal, Holder<TrialSpawnerConfig> ominous, int targetCooldownLength, int requiredPlayerRange)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TrialSpawner.FullConfig
static final com.mojang.serialization.MapCodec
<TrialSpawner.FullConfig> private final Holder
<TrialSpawnerConfig> The field for thenormal
record component.private final Holder
<TrialSpawnerConfig> The field for theominous
record component.private final int
The field for therequiredPlayerRange
record component.private final int
The field for thetargetCooldownLength
record component. -
Constructor Summary
ConstructorsConstructorDescriptionFullConfig
(Holder<TrialSpawnerConfig> normal, Holder<TrialSpawnerConfig> ominous, int targetCooldownLength, int requiredPlayerRange) Creates an instance of aFullConfig
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.normal()
Returns the value of thenormal
record component.ominous()
Returns the value of theominous
record component.overrideEntity
(EntityType<?> pEntity) int
Returns the value of therequiredPlayerRange
record component.int
Returns the value of thetargetCooldownLength
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
normal
The field for thenormal
record component. -
ominous
The field for theominous
record component. -
targetCooldownLength
private final int targetCooldownLengthThe field for thetargetCooldownLength
record component. -
requiredPlayerRange
private final int requiredPlayerRangeThe field for therequiredPlayerRange
record component. -
MAP_CODEC
-
DEFAULT
-
-
Constructor Details
-
FullConfig
public FullConfig(Holder<TrialSpawnerConfig> normal, Holder<TrialSpawnerConfig> ominous, int targetCooldownLength, int requiredPlayerRange) Creates an instance of aFullConfig
record class.- Parameters:
normal
- the value for thenormal
record componentominous
- the value for theominous
record componenttargetCooldownLength
- the value for thetargetCooldownLength
record componentrequiredPlayerRange
- the value for therequiredPlayerRange
record component
-
-
Method Details
-
overrideEntity
-
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 '=='. -
normal
Returns the value of thenormal
record component.- Returns:
- the value of the
normal
record component
-
ominous
Returns the value of theominous
record component.- Returns:
- the value of the
ominous
record component
-
targetCooldownLength
public int targetCooldownLength()Returns the value of thetargetCooldownLength
record component.- Returns:
- the value of the
targetCooldownLength
record component
-
requiredPlayerRange
public int requiredPlayerRange()Returns the value of therequiredPlayerRange
record component.- Returns:
- the value of the
requiredPlayerRange
record component
-