Record Class StructureCheck
java.lang.Object
java.lang.Record
net.minecraft.world.entity.variant.StructureCheck
- All Implemented Interfaces:
Predicate<SpawnContext>, PriorityProvider.SelectorCondition<SpawnContext>, SpawnCondition
public record StructureCheck(HolderSet<Structure> requiredStructures)
extends Record
implements SpawnCondition
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<StructureCheck> The field for therequiredStructuresrecord component.Fields inherited from interface SpawnCondition
CODEC -
Constructor Summary
ConstructorsConstructorDescriptionStructureCheck(HolderSet<Structure> requiredStructures) Creates an instance of aStructureCheckrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<StructureCheck> 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 therequiredStructuresrecord component.booleantest(SpawnContext context) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
requiredStructures
-
MAP_CODEC
-
-
Constructor Details
-
StructureCheck
-
-
Method Details
-
test
- Specified by:
testin interfacePredicate<SpawnContext>
-
codec
- Specified by:
codecin interfaceSpawnCondition
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
requiredStructures
-