Record Class BiomeCheck
java.lang.Object
java.lang.Record
net.minecraft.world.entity.variant.BiomeCheck
- All Implemented Interfaces:
 Predicate<SpawnContext>,PriorityProvider.SelectorCondition<SpawnContext>,SpawnCondition
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<BiomeCheck> The field for therequiredBiomesrecord component.Fields inherited from interface net.minecraft.world.entity.variant.SpawnCondition
CODEC - 
Constructor Summary
ConstructorsConstructorDescriptionBiomeCheck(HolderSet<Biome> requiredBiomes) Creates an instance of aBiomeCheckrecord class. - 
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<BiomeCheck> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of therequiredBiomesrecord component.booleantest(SpawnContext p_400182_) final StringtoString()Returns a string representation of this record class. 
- 
Field Details
- 
requiredBiomes
The field for therequiredBiomesrecord component. - 
MAP_CODEC
 
 - 
 - 
Constructor Details
- 
BiomeCheck
Creates an instance of aBiomeCheckrecord class.- Parameters:
 requiredBiomes- the value for therequiredBiomesrecord 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). - 
requiredBiomes
Returns the value of therequiredBiomesrecord component.- Returns:
 - the value of the 
requiredBiomesrecord component 
 
 -