Package net.glowstone.generator.objects
Class RandomItemsContent
java.lang.Object
net.glowstone.generator.objects.RandomItemsContent
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddItem(RandomItemsContent.RandomAmountItem item, int weight) booleanfillContainer(Random random, org.bukkit.block.BlockState state, int maxStacks) Populates a container with random items.getRandomItem(Random random) Choose a randomRandomItemsContent.RandomAmountItem.
-
Constructor Details
-
RandomItemsContent
public RandomItemsContent()
-
-
Method Details
-
addItem
-
fillContainer
Populates a container with random items.- Parameters:
random- the PRNG to usestate- the block state for a container blockmaxStacks- the maximum number of slots to fill- Returns:
- true if successful (currently always true)
-
getRandomItem
Choose a randomRandomItemsContent.RandomAmountItem.- Parameters:
random- the PRNG to use- Returns:
- the random item
-