记录类 PlayerPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.PlayerPredicate
- 所有已实现的接口:
EntitySubPredicate
public record PlayerPredicate(MinMaxBounds.Ints level, GameTypePredicate gameType, List<PlayerPredicate.StatMatcher<?>> stats, it.unimi.dsi.fastutil.objects.Object2BooleanMap<ResourceKey<Recipe<?>>> recipes, Map<ResourceLocation,PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> lookingAt, Optional<InputPredicate> input)
extends Record
implements EntitySubPredicate
-
嵌套类概要
嵌套类修饰符和类型类说明(专用程序包) static final record
(专用程序包) static final record
(专用程序包) static interface
static class
(专用程序包) static final record
-
字段概要
字段修饰符和类型字段说明private final Map
<ResourceLocation, PlayerPredicate.AdvancementPredicate> advancements
记录组件的字段。static final com.mojang.serialization.MapCodec
<PlayerPredicate> private final GameTypePredicate
gameType
记录组件的字段。private final Optional
<InputPredicate> input
记录组件的字段。private final MinMaxBounds.Ints
level
记录组件的字段。static final int
private final Optional
<EntityPredicate> lookingAt
记录组件的字段。private final it.unimi.dsi.fastutil.objects.Object2BooleanMap
<ResourceKey<Recipe<?>>> recipes
记录组件的字段。private final List
<PlayerPredicate.StatMatcher<?>> stats
记录组件的字段。 -
构造器概要
构造器构造器说明PlayerPredicate
(MinMaxBounds.Ints level, GameTypePredicate gameType, List<PlayerPredicate.StatMatcher<?>> stats, it.unimi.dsi.fastutil.objects.Object2BooleanMap<ResourceKey<Recipe<?>>> recipes, Map<ResourceLocation, PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> lookingAt, Optional<InputPredicate> input) 创建PlayerPredicate
记录类的实例。 -
方法概要
修饰符和类型方法说明返回advancements
记录组件的值。com.mojang.serialization.MapCodec
<PlayerPredicate> codec()
final boolean
指示某个其他对象是否“等于”此对象。gameType()
返回gameType
记录组件的值。final int
hashCode()
返回此对象的哈希代码值。input()
返回input
记录组件的值。level()
返回level
记录组件的值。返回lookingAt
记录组件的值。boolean
matches
(Entity p_222484_, ServerLevel p_222485_, Vec3 p_222486_) it.unimi.dsi.fastutil.objects.Object2BooleanMap
<ResourceKey<Recipe<?>>> recipes()
返回recipes
记录组件的值。stats()
返回stats
记录组件的值。final String
toString()
返回此记录类的字符串表示形式。
-
字段详细资料
-
level
level
记录组件的字段。 -
gameType
gameType
记录组件的字段。 -
stats
stats
记录组件的字段。 -
recipes
recipes
记录组件的字段。 -
advancements
advancements
记录组件的字段。 -
lookingAt
lookingAt
记录组件的字段。 -
input
input
记录组件的字段。 -
LOOKING_AT_RANGE
public static final int LOOKING_AT_RANGE- 另请参阅:
-
CODEC
-
-
构造器详细资料
-
PlayerPredicate
public PlayerPredicate(MinMaxBounds.Ints level, GameTypePredicate gameType, List<PlayerPredicate.StatMatcher<?>> stats, it.unimi.dsi.fastutil.objects.Object2BooleanMap<ResourceKey<Recipe<?>>> recipes, Map<ResourceLocation, PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> lookingAt, Optional<InputPredicate> input) 创建PlayerPredicate
记录类的实例。- 参数:
level
-level
记录组件的值gameType
-gameType
记录组件的值stats
-stats
记录组件的值recipes
-recipes
记录组件的值advancements
-advancements
记录组件的值lookingAt
-lookingAt
记录组件的值input
-input
记录组件的值
-
-
方法详细资料
-
matches
- 指定者:
matches
在接口中EntitySubPredicate
-
codec
- 指定者:
codec
在接口中EntitySubPredicate
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用Objects::equals(Object,Object)
进行比较。 -
level
返回level
记录组件的值。- 返回:
level
记录组件的值
-
gameType
返回gameType
记录组件的值。- 返回:
gameType
记录组件的值
-
stats
返回stats
记录组件的值。- 返回:
stats
记录组件的值
-
recipes
返回recipes
记录组件的值。- 返回:
recipes
记录组件的值
-
advancements
返回advancements
记录组件的值。- 返回:
advancements
记录组件的值
-
lookingAt
返回lookingAt
记录组件的值。- 返回:
lookingAt
记录组件的值
-
input
返回input
记录组件的值。- 返回:
input
记录组件的值
-