Record Class MonsterSettings
java.lang.Object
java.lang.Record
dev.wyck.wrapper.entity.data.MonsterSettings
@NullMarked
@AsOf("2.4.0")
public record MonsterSettings(IntProvider monsterSpawnLightTest, int monsterSpawnBlockLightLimit)
extends Record
Wrapper for a dimension's monster spawn settings.
- Since:
- 2.4.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMonsterSettings(IntProvider monsterSpawnLightTest, int monsterSpawnBlockLightLimit) Creates an instance of aMonsterSettingsrecord 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.intReturns the value of themonsterSpawnBlockLightLimitrecord component.Returns the value of themonsterSpawnLightTestrecord component.static MonsterSettingsof(int spawnLightLevel, int blockLightLimit) Creates a new DimensionalMonsterSettings with the given spawn light level and block light limit.static MonsterSettingsVanilla overworld defaults: uniform [0, 7] spawn light, block light limit 0.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
MIN_LIGHT
public static final int MIN_LIGHT- See Also:
-
MAX_LIGHT
public static final int MAX_LIGHT- See Also:
-
-
Constructor Details
-
MonsterSettings
@AsOf("2.4.0") public MonsterSettings(IntProvider monsterSpawnLightTest, int monsterSpawnBlockLightLimit) Creates an instance of aMonsterSettingsrecord class.- Parameters:
monsterSpawnLightTest- the value for themonsterSpawnLightTestrecord componentmonsterSpawnBlockLightLimit- the value for themonsterSpawnBlockLightLimitrecord component
-
-
Method Details
-
of
Creates a new DimensionalMonsterSettings with the given spawn light level and block light limit.- Parameters:
spawnLightLevel- the fixed spawn light level to use for monster spawning. Must be in the range [0, 15].blockLightLimit- the fixed block light limit to use for monster spawning. Must be in the range [0, 15].- Returns:
- a new DimensionalMonsterSettings with the given spawn light level and block light limit.
- Since:
- 2.4.0
-
overworld
Vanilla overworld defaults: uniform [0, 7] spawn light, block light limit 0.- Returns:
- a new DimensionalMonsterSettings with the vanilla overworld defaults.
- Since:
- 2.4.0
-
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. -
monsterSpawnLightTest
Returns the value of themonsterSpawnLightTestrecord component.- Returns:
- the value of the
monsterSpawnLightTestrecord component
-
monsterSpawnBlockLightLimit
public int monsterSpawnBlockLightLimit()Returns the value of themonsterSpawnBlockLightLimitrecord component.- Returns:
- the value of the
monsterSpawnBlockLightLimitrecord component
-