Class RandomItemsContent

java.lang.Object
net.glowstone.generator.objects.RandomItemsContent

public class RandomItemsContent extends Object
  • Constructor Details

    • RandomItemsContent

      public RandomItemsContent()
  • Method Details

    • addItem

      public void addItem(RandomItemsContent.RandomAmountItem item, int weight)
    • fillContainer

      public boolean fillContainer(Random random, org.bukkit.block.BlockState state, int maxStacks)
      Populates a container with random items.
      Parameters:
      random - the PRNG to use
      state - the block state for a container block
      maxStacks - the maximum number of slots to fill
      Returns:
      true if successful (currently always true)
    • getRandomItem

      public RandomItemsContent.RandomAmountItem getRandomItem(Random random)
      Parameters:
      random - the PRNG to use
      Returns:
      the random item