程序包 org.bukkit.loot
类 LootContext
java.lang.Object
org.bukkit.loot.LootContext
Represents additional information a
LootTable
can use to modify it's
generated loot.-
嵌套类概要
-
字段概要
-
方法概要
修饰符和类型方法说明Get theHumanEntity
who killed thegetLootedEntity()
.TheLocation
to store where the loot will be generated.Get theEntity
that was killed.int
已过时。no longer functionalfloat
getLuck()
Represents thePotionEffectType.LUCK
that an entity can have.
-
字段详细资料
-
DEFAULT_LOOT_MODIFIER
public static final int DEFAULT_LOOT_MODIFIER- 另请参阅:
-
-
方法详细资料
-
getLocation
TheLocation
to store where the loot will be generated.- 返回:
- the Location of where the loot will be generated
-
getLuck
public float getLuck()Represents thePotionEffectType.LUCK
that an entity can have. The higher the value the better chance of receiving more loot.- 返回:
- luck
-
getLootingModifier
已过时。no longer functionalRepresents theEnchantment.LOOTING
thegetKiller()
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.- 返回:
- the looting level
-
getLootedEntity
Get theEntity
that was killed. Can be null.- 返回:
- the looted entity or null
-
getKiller
Get theHumanEntity
who killed thegetLootedEntity()
. Can be null.- 返回:
- the killer entity, or null.
-