Record Class DimensionType.MonsterSettings
java.lang.Object
java.lang.Record
net.minecraft.world.level.dimension.DimensionType.MonsterSettings
- Enclosing class:
- DimensionType
public static record DimensionType.MonsterSettings(boolean piglinSafe, boolean hasRaids, IntProvider monsterSpawnLightTest, int monsterSpawnBlockLightLimit)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<DimensionType.MonsterSettings>
private final boolean
The field for thehasRaids
record component.private final int
The field for themonsterSpawnBlockLightLimit
record component.private final IntProvider
The field for themonsterSpawnLightTest
record component.private final boolean
The field for thepiglinSafe
record component. -
Constructor Summary
ConstructorsConstructorDescriptionMonsterSettings
(boolean piglinSafe, boolean hasRaids, IntProvider monsterSpawnLightTest, int monsterSpawnBlockLightLimit) Creates an instance of aMonsterSettings
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.boolean
hasRaids()
Returns the value of thehasRaids
record component.int
Returns the value of themonsterSpawnBlockLightLimit
record component.Returns the value of themonsterSpawnLightTest
record component.boolean
Returns the value of thepiglinSafe
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
piglinSafe
private final boolean piglinSafeThe field for thepiglinSafe
record component. -
hasRaids
private final boolean hasRaidsThe field for thehasRaids
record component. -
monsterSpawnLightTest
The field for themonsterSpawnLightTest
record component. -
monsterSpawnBlockLightLimit
private final int monsterSpawnBlockLightLimitThe field for themonsterSpawnBlockLightLimit
record component. -
CODEC
-
-
Constructor Details
-
MonsterSettings
public MonsterSettings(boolean piglinSafe, boolean hasRaids, IntProvider monsterSpawnLightTest, int monsterSpawnBlockLightLimit) Creates an instance of aMonsterSettings
record class.- Parameters:
piglinSafe
- the value for thepiglinSafe
record componenthasRaids
- the value for thehasRaids
record componentmonsterSpawnLightTest
- the value for themonsterSpawnLightTest
record componentmonsterSpawnBlockLightLimit
- the value for themonsterSpawnBlockLightLimit
record component
-
-
Method Details
-
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 '=='. -
piglinSafe
public boolean piglinSafe()Returns the value of thepiglinSafe
record component.- Returns:
- the value of the
piglinSafe
record component
-
hasRaids
public boolean hasRaids()Returns the value of thehasRaids
record component.- Returns:
- the value of the
hasRaids
record component
-
monsterSpawnLightTest
Returns the value of themonsterSpawnLightTest
record component.- Returns:
- the value of the
monsterSpawnLightTest
record component
-
monsterSpawnBlockLightLimit
public int monsterSpawnBlockLightLimit()Returns the value of themonsterSpawnBlockLightLimit
record component.- Returns:
- the value of the
monsterSpawnBlockLightLimit
record component
-