程序包 org.bukkit.loot
接口 LootTable
- 所有超级接口:
Keyed
LootTables are technical files that represent what items should be in
naturally generated containers, what items should be dropped when killing a
mob, or what items can be fished.
See the Minecraft Wiki for more information.
See the Minecraft Wiki for more information.
-
方法概要
修饰符和类型方法说明void
fillInventory
(@NotNull Inventory inventory, @Nullable Random random, @NotNull LootContext context) Attempt to fill an inventory with this LootTable's loot.populateLoot
(@Nullable Random random, @NotNull LootContext context) Returns a mutable list of loot generated by this LootTable.
-
方法详细资料
-
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
- the random instance to use to generate lootcontext
- context within to populate loot- 返回:
- a list of ItemStacks
-
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
- the inventory to fillrandom
- the random instance to use to generate lootcontext
- context within to populate loot
-