程序包 org.bukkit.loot
类 LootContext
java.lang.Object
org.bukkit.loot.LootContext
表示
LootTable 可以用来修改其生成的战利品的附加信息。-
嵌套类概要
嵌套类 -
字段概要
字段 -
方法概要
修饰符和类型方法说明获取杀死getLootedEntity()的HumanEntity。存储战利品生成位置的Location。获取被杀死的Entity。int已过时。不再起作用floatgetLuck()表示实体可以拥有的PotionEffectType.LUCK。
-
字段详细资料
-
DEFAULT_LOOT_MODIFIER
public static final int DEFAULT_LOOT_MODIFIER- 另请参阅:
-
-
方法详细资料
-
getLocation
- 返回:
- 战利品将生成的位置
-
getLuck
public float getLuck()表示实体可以拥有的PotionEffectType.LUCK。值越高,获得更多战利品的几率越大。原文: Represents the
PotionEffectType.LUCKthat an entity can have. The higher the value the better chance of receiving more loot.- 返回:
- 幸运值
-
getLootingModifier
已过时。不再起作用表示getKiller()实体在其装备物品上的Enchantment.LOOTING。 此值仅通过LootContext.Builder.lootingModifier(int)设置。如果未设置,将使用getKiller()实体的抢夺等级。原文: Represents the
Enchantment.LOOTINGthegetKiller()entity has on their equipped item. This value is only set viaLootContext.Builder.lootingModifier(int). If not set, thegetKiller()entity's looting level will be used instead.- 返回:
- 抢夺等级
-
getLootedEntity
- 返回:
- 被掠夺的实体或 null
-
getKiller
获取杀死getLootedEntity()的HumanEntity。可能为 null。原文: Get the
HumanEntitywho killed thegetLootedEntity(). Can be null.- 返回:
- 击杀者实体,或 null。
-