Random array of items

Discussion in 'Plugin Development' started by chrisman0091, Dec 29, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    chrisman0091

    Im working on a plugin where there will be chests spawned in with random loot in them. I have everything working, except for the actually items inside part. So I need to know how I would go about having an array of items that are random every time rather than just being set loot in. How would I go about doing this? Feel free to ask questions about what I mean, I can see that this might come across as a confusion question.
     
  2. Offline

    xTigerRebornx

    chrisman0091 Create an inventory of items, and use the Random to pick the ammount of items you want in a chest. Then, take the random ammount of items from the inventory randomly
     
  3. Offline

    Jogy34

    I do what you're looking to do here (but probably in a much more complex way than needed).

    Besides that, the ways xTigerRebornx suggested would work but I would use an array of ItemStacks to pick from instead of a chest.
     
  4. Offline

    xTigerRebornx

    Jogy34 Array would work to, I just suggested the first thing that came to find
     
Thread Status:
Not open for further replies.

Share This Page