程序包 org.bukkit.loot
接口 LootTable
- 所有超级接口:
Keyed
战利品表是技术性文件,用于表示自然生成的容器中应包含哪些物品、杀死生物时应掉落哪些物品,或者哪些物品可以通过钓鱼获得。
更多信息请参见 Minecraft Wiki。
更多信息请参见 Minecraft Wiki。
-
方法概要
修饰符和类型方法说明voidfillInventory(@NotNull Inventory inventory, @Nullable Random random, @NotNull LootContext context) 尝试用此战利品表的战利品填充一个容器。populateLoot(@Nullable Random random, @NotNull LootContext context) 返回由此战利品表生成的可变物品列表。
-
方法详细资料
-
populateLoot
@NotNull @NotNull Collection<ItemStack> populateLoot(@Nullable @Nullable Random random, @NotNull @NotNull LootContext context) 返回由此战利品表生成的可变物品列表。原文: Returns a mutable list of loot generated by this LootTable.
- 参数:
random- 用于生成战利品的随机实例context- 用于填充战利品的上下文- 返回:
- 物品栈列表
-
fillInventory
void fillInventory(@NotNull @NotNull Inventory inventory, @Nullable @Nullable Random random, @NotNull @NotNull LootContext context) 尝试用此战利品表的战利品填充一个容器。原文: Attempt to fill an inventory with this LootTable's loot.
- 参数:
inventory- 要填充的容器random- 用于生成战利品的随机实例context- 用于填充战利品的上下文
-