Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Would it be possible to set a stack size for an item above 64 and make it work without problems?

 

As for now I can actually pick over 64 of my custom item (Middle click in creative mode) but when I place them in my inventory the stack created is only 64 and the remaining ones are still in my hand... (In survival the stack in inventory stops at 64 and it starts a new one.

 

I guess I have to overwrite something else that I'm missing, but not sure.

 

private static int maxStack = 80;

public ItemOre()
{
	super();
	this.setMaxStackSize(maxStack);
	this.setCreativeTab(ModCreativeTab.BD_Misc);

}

@Override
    public Item setMaxStackSize(int stackSize)
    {
        this.maxStack = stackSize;
        return this;
    }

    /**
     * Returns the maximum size of the stack for a specific item.
     */
@Override
    @Deprecated
    public int getItemStackLimit()
    {
        return this.maxStack;
    }

 

Most likely I'm also including the getItemStackLimit but I guess that's actually not needed.

 

not possible without serious hacking.

we already had this topic once here.

why do you need a stack size bigger then 64?

  • Author

not possible without serious hacking.

we already had this topic once here.

why do you need a stack size bigger then 64?

 

Really it's just for the LULZ (For fun) on some items in my mod I needed a number higher than 64. I thought it was something easy (well, not easy, but I saw it I believe on Tinkers Constructs Arrows I believe)

 

I will stick to 64 I guess, don't want to make things more complicate in my code, lol.

 

Thanks for the answer ;)

Tinkers' Construct don't use the vanilla stack size system. They store their own stack size in the NBT of the

ItemStack

, and draw the stack size in the IItemRenderer they use, so you can do that if you want.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

  • Author

Tinkers' Construct don't use the vanilla stack size system. They store their own stack size in the NBT of the

ItemStack

, and draw the stack size in the IItemRenderer they use, so you can do that if you want.

 

Ohh ok, thanks for the tip. I'm not good with NBT but when I learn that I can give this a try.

 

Thanks once again.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.