Record Class MoonBrightnessCheck
java.lang.Object
java.lang.Record
net.minecraft.world.entity.variant.MoonBrightnessCheck
- All Implemented Interfaces:
 Predicate<SpawnContext>,PriorityProvider.SelectorCondition<SpawnContext>,SpawnCondition
public record MoonBrightnessCheck(MinMaxBounds.Doubles range)
extends Record
implements SpawnCondition
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<MoonBrightnessCheck> private final MinMaxBounds.DoublesThe field for therangerecord component.Fields inherited from interface net.minecraft.world.entity.variant.SpawnCondition
CODEC - 
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aMoonBrightnessCheckrecord class. - 
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<MoonBrightnessCheck> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.range()Returns the value of therangerecord component.booleantest(SpawnContext pContext) final StringtoString()Returns a string representation of this record class. 
- 
Field Details
- 
range
The field for therangerecord component. - 
MAP_CODEC
 
 - 
 - 
Constructor Details
- 
MoonBrightnessCheck
Creates an instance of aMoonBrightnessCheckrecord class.- Parameters:
 range- the value for therangerecord component
 
 - 
 - 
Method Details
- 
test
- Specified by:
 testin interfacePredicate<SpawnContext>
 - 
codec
- Specified by:
 codecin interfaceSpawnCondition
 - 
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 withObjects::equals(Object,Object). - 
range
Returns the value of therangerecord component.- Returns:
 - the value of the 
rangerecord component 
 
 -