Solved AutoSmelt buggy?

Discussion in 'Plugin Development' started by Sean0402, Aug 26, 2014.

Thread Status:
Not open for further replies.
  1. <Message Removed>
     
  2. Offline

    Gater12

    Sean0402
    random number is can be 0 to the number exclusive of that number. (Meaning possibilities for numbers of 3 are 0, 1, and 2)
     
  3. Gater12 how do I make it work then? sorry for not understanding what you said much.
     
  4. Offline

    Gater12

    Sean0402
    Just add one to the random number.
     
  5. Gater12 I'm trying to add one to it but what ever I try isn't working. I'm guessing you use ints. Could you possibly help?
     
  6. Offline

    SmooshCakez

    random.nextInt() + 1 seems promising.
     
  7. SmooshCakez one problem. When I mine with fortune it gives me a full inv of that item. And when I mine coal ore it give me 1 coal and won't go up.
     
  8. Offline

    SmooshCakez

    Set the max of the random int.
    random.nextInt(MAX_AMOUNT_OF_ITEMS) + 1
     
  9. SmooshCakez so i'm guessing 64?

    SmooshCakez the only problem is that if I use fortune 1 it gives me the MAX_AMOUNT_OF_ITEMS that you give it. How do I make it like I had it before? Random?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 10, 2016
  10. Offline

    SmooshCakez

  11. SmooshCakez i'm confused now.. Do the same thing I done before then add 1? I already added 1? I'm sorry for being confused :/

    Code:java
    1. int randomAmount = random.nextInt(10) + 1;
     
  12. Offline

    SmooshCakez

    Yeah, do that.
     
  13. I got it working now thanks!
     
Thread Status:
Not open for further replies.

Share This Page