Record Class LocationPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.LocationPredicate
public record LocationPredicate(Optional<LocationPredicate.PositionPredicate> position, Optional<ResourceKey<Biome>> biome, Optional<ResourceKey<Structure>> structure, Optional<ResourceKey<Level>> dimension, Optional<Boolean> smokey, Optional<LightPredicate> light, Optional<BlockPredicate> block, Optional<FluidPredicate> fluid)
extends Record
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic class(package private) static final record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final Optional<ResourceKey<Biome>>The field for thebiomerecord component.private final Optional<BlockPredicate>The field for theblockrecord 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.private final Optional<ResourceKey<Structure>>The field for thestructurerecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionLocationPredicate(Optional<LocationPredicate.PositionPredicate> position, Optional<ResourceKey<Biome>> biome, Optional<ResourceKey<Structure>> structure, Optional<ResourceKey<Level>> dimension, Optional<Boolean> smokey, Optional<LightPredicate> light, Optional<BlockPredicate> block, Optional<FluidPredicate> fluid) Creates an instance of aLocationPredicaterecord class.
- 
Method SummaryModifier and TypeMethodDescriptionbiome()Returns the value of thebiomerecord component.block()Returns the value of theblockrecord 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 p_52618_, double p_52619_, double p_52620_, double p_52621_) private static Optional<LocationPredicate>of(Optional<LocationPredicate.PositionPredicate> p_299175_, Optional<ResourceKey<Biome>> p_298741_, Optional<ResourceKey<Structure>> p_298654_, Optional<ResourceKey<Level>> p_298829_, Optional<Boolean> p_299313_, Optional<LightPredicate> p_299195_, Optional<BlockPredicate> p_299295_, Optional<FluidPredicate> p_298350_) position()Returns the value of thepositionrecord component.smokey()Returns the value of thesmokeyrecord component.Returns the value of thestructurerecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
positionThe field for thepositionrecord component.
- 
biomeThe field for thebiomerecord component.
- 
structureThe field for thestructurerecord component.
- 
dimensionThe field for thedimensionrecord component.
- 
smokeyThe field for thesmokeyrecord component.
- 
lightThe field for thelightrecord component.
- 
blockThe field for theblockrecord component.
- 
fluidThe field for thefluidrecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
LocationPredicatepublic LocationPredicate(Optional<LocationPredicate.PositionPredicate> position, Optional<ResourceKey<Biome>> biome, Optional<ResourceKey<Structure>> structure, Optional<ResourceKey<Level>> dimension, Optional<Boolean> smokey, Optional<LightPredicate> light, Optional<BlockPredicate> block, Optional<FluidPredicate> fluid) Creates an instance of aLocationPredicaterecord class.- Parameters:
- position- the value for the- positionrecord component
- biome- the value for the- biomerecord component
- structure- the value for the- structurerecord component
- dimension- the value for the- dimensionrecord component
- smokey- the value for the- smokeyrecord component
- light- the value for the- lightrecord component
- block- the value for the- blockrecord component
- fluid- the value for the- fluidrecord component
 
 
- 
- 
Method Details- 
ofprivate static Optional<LocationPredicate> of(Optional<LocationPredicate.PositionPredicate> p_299175_, Optional<ResourceKey<Biome>> p_298741_, Optional<ResourceKey<Structure>> p_298654_, Optional<ResourceKey<Level>> p_298829_, Optional<Boolean> p_299313_, Optional<LightPredicate> p_299195_, Optional<BlockPredicate> p_299295_, Optional<FluidPredicate> p_298350_) 
- 
matches
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
positionReturns the value of thepositionrecord component.- Returns:
- the value of the positionrecord component
 
- 
biomeReturns the value of thebiomerecord component.- Returns:
- the value of the biomerecord component
 
- 
structureReturns the value of thestructurerecord component.- Returns:
- the value of the structurerecord component
 
- 
dimensionReturns the value of thedimensionrecord component.- Returns:
- the value of the dimensionrecord component
 
- 
smokeyReturns the value of thesmokeyrecord component.- Returns:
- the value of the smokeyrecord component
 
- 
lightReturns the value of thelightrecord component.- Returns:
- the value of the lightrecord component
 
- 
blockReturns the value of theblockrecord component.- Returns:
- the value of the blockrecord component
 
- 
fluidReturns the value of thefluidrecord component.- Returns:
- the value of the fluidrecord component
 
 
-