mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
SPIGOT-6901: Make Random Nullable in LootTable
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
b1dcda93fd
commit
ab18a979b8
1 changed files with 3 additions and 2 deletions
|
@ -6,6 +6,7 @@ import org.bukkit.Keyed;
|
|||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* LootTables are technical files that represent what items should be in
|
||||
|
@ -25,7 +26,7 @@ public interface LootTable extends Keyed {
|
|||
* @return a list of ItemStacks
|
||||
*/
|
||||
@NotNull
|
||||
Collection<ItemStack> populateLoot(@NotNull Random random, @NotNull LootContext context);
|
||||
Collection<ItemStack> populateLoot(@Nullable Random random, @NotNull LootContext context);
|
||||
|
||||
/**
|
||||
* Attempt to fill an inventory with this LootTable's loot.
|
||||
|
@ -34,5 +35,5 @@ public interface LootTable extends Keyed {
|
|||
* @param random the random instance to use to generate loot
|
||||
* @param context context within to populate loot
|
||||
*/
|
||||
void fillInventory(@NotNull Inventory inventory, @NotNull Random random, @NotNull LootContext context);
|
||||
void fillInventory(@NotNull Inventory inventory, @Nullable Random random, @NotNull LootContext context);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue