记录类 KilledByArrowTrigger.TriggerInstance
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.KilledByArrowTrigger.TriggerInstance
- 封闭类:
KilledByArrowTrigger
public static record KilledByArrowTrigger.TriggerInstance(Optional<ContextAwarePredicate> player, List<ContextAwarePredicate> victims, MinMaxBounds.Ints uniqueEntityTypes, Optional<ItemPredicate> firedFromWeapon)
extends Record
implements SimpleCriterionTrigger.SimpleInstance
-
字段概要
字段修饰符和类型字段说明static final com.mojang.serialization.Codec
<KilledByArrowTrigger.TriggerInstance> private final Optional
<ItemPredicate> firedFromWeapon
记录组件的字段。private final Optional
<ContextAwarePredicate> player
记录组件的字段。private final MinMaxBounds.Ints
uniqueEntityTypes
记录组件的字段。private final List
<ContextAwarePredicate> victims
记录组件的字段。 -
构造器概要
构造器构造器说明TriggerInstance
(Optional<ContextAwarePredicate> player, List<ContextAwarePredicate> victims, MinMaxBounds.Ints uniqueEntityTypes, Optional<ItemPredicate> firedFromWeapon) 创建TriggerInstance
记录类的实例。 -
方法概要
修饰符和类型方法说明crossbowKilled
(HolderGetter<Item> p_373005_, EntityPredicate.Builder... p_373068_) crossbowKilled
(HolderGetter<Item> p_373076_, MinMaxBounds.Ints p_372922_) final boolean
指示某个其他对象是否“等于”此对象。返回firedFromWeapon
记录组件的值。final int
hashCode()
返回此对象的哈希代码值。boolean
matches
(Collection<LootContext> p_372887_, int p_372892_, ItemStack p_372931_) player()
返回player
记录组件的值。final String
toString()
返回此记录类的字符串表示形式。返回uniqueEntityTypes
记录组件的值。void
validate
(CriterionValidator p_373032_) victims()
返回victims
记录组件的值。
-
字段详细资料
-
player
player
记录组件的字段。 -
victims
victims
记录组件的字段。 -
uniqueEntityTypes
uniqueEntityTypes
记录组件的字段。 -
firedFromWeapon
firedFromWeapon
记录组件的字段。 -
CODEC
-
-
构造器详细资料
-
TriggerInstance
public TriggerInstance(Optional<ContextAwarePredicate> player, List<ContextAwarePredicate> victims, MinMaxBounds.Ints uniqueEntityTypes, Optional<ItemPredicate> firedFromWeapon) 创建TriggerInstance
记录类的实例。- 参数:
player
-player
记录组件的值victims
-victims
记录组件的值uniqueEntityTypes
-uniqueEntityTypes
记录组件的值firedFromWeapon
-firedFromWeapon
记录组件的值
-
-
方法详细资料
-
crossbowKilled
public static Criterion<KilledByArrowTrigger.TriggerInstance> crossbowKilled(HolderGetter<Item> p_373005_, EntityPredicate.Builder... p_373068_) -
crossbowKilled
public static Criterion<KilledByArrowTrigger.TriggerInstance> crossbowKilled(HolderGetter<Item> p_373076_, MinMaxBounds.Ints p_372922_) -
matches
public boolean matches(Collection<LootContext> p_372887_, int p_372892_, @Nullable ItemStack p_372931_) -
validate
- 指定者:
validate
在接口中CriterionTriggerInstance
- 指定者:
validate
在接口中SimpleCriterionTrigger.SimpleInstance
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用Objects::equals(Object,Object)
进行比较。 -
player
返回player
记录组件的值。- 指定者:
player
在接口中SimpleCriterionTrigger.SimpleInstance
- 返回:
player
记录组件的值
-
victims
返回victims
记录组件的值。- 返回:
victims
记录组件的值
-
uniqueEntityTypes
返回uniqueEntityTypes
记录组件的值。- 返回:
uniqueEntityTypes
记录组件的值
-
firedFromWeapon
返回firedFromWeapon
记录组件的值。- 返回:
firedFromWeapon
记录组件的值
-