Record Class PlayerPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.PlayerPredicate
- All Implemented Interfaces:
- EntitySubPredicate
public record PlayerPredicate(MinMaxBounds.Ints level, Optional<GameType> gameType, List<PlayerPredicate.StatMatcher<?>> stats, it.unimi.dsi.fastutil.objects.Object2BooleanMap<ResourceLocation> recipes, Map<ResourceLocation,PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> lookingAt)
extends Record
implements EntitySubPredicate 
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescription(package private) static final record(package private) static final record(package private) static interfacestatic class(package private) static final recordNested classes/interfaces inherited from interface net.minecraft.advancements.critereon.EntitySubPredicateEntitySubPredicate.Type, EntitySubPredicate.Types
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final Map<ResourceLocation,PlayerPredicate.AdvancementPredicate> The field for theadvancementsrecord component.static final com.mojang.serialization.MapCodec<PlayerPredicate>The field for thegameTyperecord component.private final MinMaxBounds.IntsThe field for thelevelrecord component.static final intprivate final Optional<EntityPredicate>The field for thelookingAtrecord component.private final it.unimi.dsi.fastutil.objects.Object2BooleanMap<ResourceLocation>The field for therecipesrecord component.private final List<PlayerPredicate.StatMatcher<?>>The field for thestatsrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerPredicate(MinMaxBounds.Ints level, Optional<GameType> gameType, List<PlayerPredicate.StatMatcher<?>> stats, it.unimi.dsi.fastutil.objects.Object2BooleanMap<ResourceLocation> recipes, Map<ResourceLocation, PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> lookingAt) Creates an instance of aPlayerPredicaterecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of theadvancementsrecord component.final booleanIndicates whether some other object is "equal to" this one.gameType()Returns the value of thegameTyperecord component.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.Returns the value of thelookingAtrecord component.booleanmatches(Entity p_222484_, ServerLevel p_222485_, Vec3 p_222486_) it.unimi.dsi.fastutil.objects.Object2BooleanMap<ResourceLocation>recipes()Returns the value of therecipesrecord component.stats()Returns the value of thestatsrecord component.final StringtoString()Returns a string representation of this record class.type()
- 
Field Details- 
levelThe field for thelevelrecord component.
- 
gameTypeThe field for thegameTyperecord component.
- 
statsThe field for thestatsrecord component.
- 
recipesThe field for therecipesrecord component.
- 
advancementsThe field for theadvancementsrecord component.
- 
lookingAtThe field for thelookingAtrecord component.
- 
LOOKING_AT_RANGEpublic static final int LOOKING_AT_RANGE- See Also:
 
- 
CODEC
 
- 
- 
Constructor Details- 
PlayerPredicatepublic PlayerPredicate(MinMaxBounds.Ints level, Optional<GameType> gameType, List<PlayerPredicate.StatMatcher<?>> stats, it.unimi.dsi.fastutil.objects.Object2BooleanMap<ResourceLocation> recipes, Map<ResourceLocation, PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> lookingAt) Creates an instance of aPlayerPredicaterecord class.- Parameters:
- level- the value for the- levelrecord component
- gameType- the value for the- gameTyperecord component
- stats- the value for the- statsrecord component
- recipes- the value for the- recipesrecord component
- advancements- the value for the- advancementsrecord component
- lookingAt- the value for the- lookingAtrecord component
 
 
- 
- 
Method Details- 
matches- Specified by:
- matchesin interface- EntitySubPredicate
 
- 
type- Specified by:
- typein interface- EntitySubPredicate
 
- 
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).
- 
levelReturns the value of thelevelrecord component.- Returns:
- the value of the levelrecord component
 
- 
gameTypeReturns the value of thegameTyperecord component.- Returns:
- the value of the gameTyperecord component
 
- 
statsReturns the value of thestatsrecord component.- Returns:
- the value of the statsrecord component
 
- 
recipesReturns the value of therecipesrecord component.- Returns:
- the value of the recipesrecord component
 
- 
advancementsReturns the value of theadvancementsrecord component.- Returns:
- the value of the advancementsrecord component
 
- 
lookingAtReturns the value of thelookingAtrecord component.- Returns:
- the value of the lookingAtrecord component
 
 
-