public class RandomItemsContent extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RandomItemsContent.RandomAmountItem |
Constructor and Description |
---|
RandomItemsContent() |
Modifier and Type | Method and Description |
---|---|
void |
addItem(RandomItemsContent.RandomAmountItem item,
int weight) |
boolean |
fillContainer(Random random,
org.bukkit.block.BlockState state,
int maxStacks)
Populates a container with random items.
|
RandomItemsContent.RandomAmountItem |
getRandomItem(Random random)
Choose a random
RandomItemsContent.RandomAmountItem . |
public void addItem(RandomItemsContent.RandomAmountItem item, int weight)
public boolean fillContainer(Random random, org.bukkit.block.BlockState state, int maxStacks)
random
- the PRNG to usestate
- the block state for a container blockmaxStacks
- the maximum number of slots to fillpublic RandomItemsContent.RandomAmountItem getRandomItem(Random random)
RandomItemsContent.RandomAmountItem
.random
- the PRNG to useCopyright © 2021. All rights reserved.