Package net.minecraft.world.level
Record Class SpawnData.CustomSpawnRules
java.lang.Object
java.lang.Record
net.minecraft.world.level.SpawnData.CustomSpawnRules
- Enclosing class:
- SpawnData
public static record SpawnData.CustomSpawnRules(InclusiveRange<Integer> blockLightLimit, InclusiveRange<Integer> skyLightLimit)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final InclusiveRange<Integer>The field for theblockLightLimitrecord component.static final com.mojang.serialization.Codec<SpawnData.CustomSpawnRules>private static final InclusiveRange<Integer>private final InclusiveRange<Integer>The field for theskyLightLimitrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionCustomSpawnRules(InclusiveRange<Integer> blockLightLimit, InclusiveRange<Integer> skyLightLimit) Creates an instance of aCustomSpawnRulesrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of theblockLightLimitrecord component.private static com.mojang.serialization.DataResult<InclusiveRange<Integer>>checkLightBoundaries(InclusiveRange<Integer> p_186593_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.private static com.mojang.serialization.MapCodec<InclusiveRange<Integer>>lightLimit(String p_286409_) Returns the value of theskyLightLimitrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
blockLightLimitThe field for theblockLightLimitrecord component.
- 
skyLightLimitThe field for theskyLightLimitrecord component.
- 
LIGHT_RANGE
- 
CODEC
 
- 
- 
Constructor Details- 
CustomSpawnRulespublic CustomSpawnRules(InclusiveRange<Integer> blockLightLimit, InclusiveRange<Integer> skyLightLimit) Creates an instance of aCustomSpawnRulesrecord class.- Parameters:
- blockLightLimit- the value for the- blockLightLimitrecord component
- skyLightLimit- the value for the- skyLightLimitrecord component
 
 
- 
- 
Method Details- 
checkLightBoundariesprivate static com.mojang.serialization.DataResult<InclusiveRange<Integer>> checkLightBoundaries(InclusiveRange<Integer> p_186593_) 
- 
lightLimitprivate static com.mojang.serialization.MapCodec<InclusiveRange<Integer>> lightLimit(String p_286409_) 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 withObjects::equals(Object,Object).
- 
blockLightLimitReturns the value of theblockLightLimitrecord component.- Returns:
- the value of the blockLightLimitrecord component
 
- 
skyLightLimitReturns the value of theskyLightLimitrecord component.- Returns:
- the value of the skyLightLimitrecord component
 
 
-