Custom Inventory -> Stack more than 64 items

Discussion in 'Plugin Development' started by cresyls, May 29, 2018.

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

    cresyls

    I'm trying to make it so I can stack up to 100 items in an inventory. I'm creating the inventory in a class and the method I found isn't working for me. I don't know if I'm doing something wrong, or if there is a different way I have to do it.

    Here is the the method I was trying to use:
    Code:
    inv.setMaxStackSize(100);
     
  2. Offline

    Zombie_Striker

    @cresyls
    From the docs:
    Code:
    Stacks larger than the default max size for this type of inventory may not display correctly in the client. 
    Even if you set the amount for an itemstack to be larger than 64, there is still a chance that the number will not be displayed correctly/ that minecraft may force-cap it back to 64. If you have been setting amounts to 100, try a smaller value, like 65 for testing.
     
  3. Offline

    DutchJellyV2

    When I tried this, the amount defaulted to 1. What you can do is add some lore displaying the amount and adding some enchant to it.
     
Thread Status:
Not open for further replies.

Share This Page