Package net.minecraft.entity.spawn
Record Class StructureSpawnCondition
java.lang.Object
java.lang.Record
net.minecraft.entity.spawn.StructureSpawnCondition
- Record Components:
requiredStructures
-
- All Implemented Interfaces:
Predicate<SpawnContext>
,SpawnCondition
,VariantSelectorProvider.SelectorCondition<SpawnContext>
public record StructureSpawnCondition(RegistryEntryList<Structure> requiredStructures)
extends Record
implements SpawnCondition
- Mappings:
Namespace Name named net/minecraft/entity/spawn/StructureSpawnCondition
intermediary net/minecraft/class_10703
official cxb
named requiredStructures
intermediary comp_3584
official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<StructureSpawnCondition> private final RegistryEntryList
<Structure> The field for therequiredStructures
record component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.com.mojang.serialization.MapCodec
<StructureSpawnCondition> getCodec()
final int
hashCode()
Returns a hash code value for this object.Returns the value of therequiredStructures
record component.boolean
test
(SpawnContext spawnContext) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
requiredStructures
The field for therequiredStructures
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/entity/spawn/StructureSpawnCondition;CODEC:Lcom/mojang/serialization/MapCodec;
intermediary field_56287
Lnet/minecraft/class_10703;field_56287:Lcom/mojang/serialization/MapCodec;
official a
Lcxb;a:Lcom/mojang/serialization/MapCodec;
-
-
Constructor Details
-
StructureSpawnCondition
-
-
Method Details
-
test
- Specified by:
test
in interfacePredicate<SpawnContext>
- Mappings:
Namespace Name Mixin selector named test
Lnet/minecraft/entity/spawn/StructureSpawnCondition;test(Lnet/minecraft/entity/spawn/SpawnContext;)Z
intermediary method_67173
Lnet/minecraft/class_10703;method_67173(Lnet/minecraft/class_10701;)Z
official a
Lcxb;a(Lcwz;)Z
-
getCodec
- Specified by:
getCodec
in interfaceSpawnCondition
- Mappings:
Namespace Name Mixin selector named getCodec
Lnet/minecraft/entity/spawn/SpawnCondition;getCodec()Lcom/mojang/serialization/MapCodec;
intermediary method_67151
Lnet/minecraft/class_10699;method_67151()Lcom/mojang/serialization/MapCodec;
official a
Lcwx;a()Lcom/mojang/serialization/MapCodec;
-
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)
. -
requiredStructures
Returns the value of therequiredStructures
record component.- Returns:
- the value of the
requiredStructures
record component
-