Record Class LocationPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.LocationPredicate
public record LocationPredicate(Optional<LocationPredicate.PositionPredicate> position, Optional<HolderSet<Biome>> biomes, Optional<HolderSet<Structure>> structures, Optional<ResourceKey<Level>> dimension, Optional<Boolean> smokey, Optional<LightPredicate> light, Optional<BlockPredicate> block, Optional<FluidPredicate> fluid, Optional<Boolean> canSeeSky)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprivate static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thebiomesrecord component.private final Optional<BlockPredicate> The field for theblockrecord component.The field for thecanSeeSkyrecord component.static final com.mojang.serialization.Codec<LocationPredicate> private final Optional<ResourceKey<Level>> The field for thedimensionrecord component.private final Optional<FluidPredicate> The field for thefluidrecord component.private final Optional<LightPredicate> The field for thelightrecord component.private final Optional<LocationPredicate.PositionPredicate> The field for thepositionrecord component.The field for thesmokeyrecord component.The field for thestructuresrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLocationPredicate(Optional<LocationPredicate.PositionPredicate> position, Optional<HolderSet<Biome>> biomes, Optional<HolderSet<Structure>> structures, Optional<ResourceKey<Level>> dimension, Optional<Boolean> smokey, Optional<LightPredicate> light, Optional<BlockPredicate> block, Optional<FluidPredicate> fluid, Optional<Boolean> canSeeSky) Creates an instance of aLocationPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionbiomes()Returns the value of thebiomesrecord component.block()Returns the value of theblockrecord component.Returns the value of thecanSeeSkyrecord component.Returns the value of thedimensionrecord component.final booleanIndicates whether some other object is "equal to" this one.fluid()Returns the value of thefluidrecord component.final inthashCode()Returns a hash code value for this object.light()Returns the value of thelightrecord component.booleanmatches(ServerLevel level, double x, double y, double z) position()Returns the value of thepositionrecord component.smokey()Returns the value of thesmokeyrecord component.Returns the value of thestructuresrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
position
The field for thepositionrecord component. -
biomes
-
structures
-
dimension
The field for thedimensionrecord component. -
smokey
-
light
The field for thelightrecord component. -
block
The field for theblockrecord component. -
fluid
The field for thefluidrecord component. -
canSeeSky
-
CODEC
-
-
Constructor Details
-
LocationPredicate
public LocationPredicate(Optional<LocationPredicate.PositionPredicate> position, Optional<HolderSet<Biome>> biomes, Optional<HolderSet<Structure>> structures, Optional<ResourceKey<Level>> dimension, Optional<Boolean> smokey, Optional<LightPredicate> light, Optional<BlockPredicate> block, Optional<FluidPredicate> fluid, Optional<Boolean> canSeeSky) Creates an instance of aLocationPredicaterecord class.- Parameters:
position- the value for thepositionrecord componentbiomes- the value for thebiomesrecord componentstructures- the value for thestructuresrecord componentdimension- the value for thedimensionrecord componentsmokey- the value for thesmokeyrecord componentlight- the value for thelightrecord componentblock- the value for theblockrecord componentfluid- the value for thefluidrecord componentcanSeeSky- the value for thecanSeeSkyrecord component
-
-
Method Details
-
matches
-
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). -
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
biomes
-
structures
-
dimension
Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
smokey
-
light
Returns the value of thelightrecord component.- Returns:
- the value of the
lightrecord component
-
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
fluid
Returns the value of thefluidrecord component.- Returns:
- the value of the
fluidrecord component
-
canSeeSky
-