[MC-3444] The give command will stack any item Created: 18/Nov/12  Updated: 27/Mar/17  Resolved: 31/Jul/14

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.4, Minecraft 1.4.5, Minecraft 1.4.7, Snapshot 13w03a, Snapshot 13w05b, Minecraft 1.5, Minecraft 1.5.2, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 13w36a, Minecraft 13w36b, Minecraft 13w39b, Minecraft 13w41a, Minecraft 13w42a, Minecraft 13w42b, Minecraft 13w43a, Minecraft 1.7, Minecraft 1.7.1, Minecraft 1.7.2, Minecraft 1.7.3, Minecraft 1.7.4, Minecraft 14w02c, Minecraft 14w03b, Minecraft 14w04a, Minecraft 14w04b, Minecraft 1.7.9
Fix Version/s: Minecraft 14w32b

Type: Bug
Reporter: [Mod] CubeTheThird Assignee: [Mojang] Searge (Michael Stoyke)
Resolution: Fixed Votes: 5
Labels: /give, anvil, armor, brewing, enchant, experience, item, pile, potion, repair, stack
Environment:

Any


Attachments: PNG File 2012-12-31_16.10.46.png    
Issue Links:
Cloners
is cloned by MC-105965 /give ignores stacking restrictions Resolved
Duplicate
is duplicated by MC-7678 Using the /give command players can o... Resolved
is duplicated by MC-8257 Comparator can pass through signals g... Resolved
is duplicated by MC-65753 /give splash potions do not stack Resolved
is duplicated by MC-66713 when we give multiple potions, they d... Resolved
is duplicated by MC-69693 /replaceitem and /give no longer give... Resolved
is duplicated by MC-73100 Potions are no longer stackable using... Resolved
Relates
relates to MC-19421 Non-stackable item left right click g... Resolved
relates to MC-58717 126 stack of potions possible Resolved
relates to MC-66813 potions do not stack with the command... Resolved
relates to MC-592 Dying stacked leather armor duplicate... Resolved
relates to MC-2752 Bug Brewing Stand Stackable ! Resolved
relates to MC-2756 Possible to put stacked sword in the ... Resolved
relates to MC-3818 Playing stacked music discs in jukebo... Resolved
CHK:
Confirmation Status: Confirmed

 Description   

When specifying the quantity of items produced by the /give command, these items will be stacked, regardless of item type.

This will result in strange and normally unachievable behaviour. For example, the command will allow you to stack items such as doors, beds, armour, tools and potions. These can create problems, as brewing stands normally only allow 1 bottle per slot, but will brew the entire stack at once. With an anvil, a stack of tools or armour can be repaired using the experience of a single item.

UPDATE:
This can also result in invalid redstone signal strengths (see MC-8257 for details).



 Comments   
Comment by Luke [ 08/Aug/14 ]

I have no idea why i didn't think of that... It's probably because those are new commands i think. Thanks guys! (BTW: i'm going to discontinue watching this issue now)

Comment by [Mod] Torabi [ 08/Aug/14 ]

Or you could just use blockdata or replaceitem to refill the contents of a dispenser. Put the command in a command block on a clock, and there you go: infinite items in a dispenser. /give ignoring the stack limits caused other problems.

Comment by Luke [ 08/Aug/14 ]

It can? wow, i'll give it a try tomorrow thanks!

Comment by Jesper the End [ 08/Aug/14 ]

guys calm down. No functionality has been taken out of the game at all. You can still give stacks of 64 using /replaceitem. Now let's stop using this issue as a forum and just deal with it. It's not going to be reverted anyway.

Comment by Nate [ 07/Aug/14 ]

sighs I guess we have to get used to /give and /summon instead of dispensers. And Luke, I don't think MCEdit would help.
Please keep this bug like you (as mojang) kept floating islands!

Comment by Luke [ 07/Aug/14 ]

Oh yeah, they did... Wow, this is bad... Idk what to do. Would MCEdit filters work to give players stacked potions?

Comment by Ely G [ 07/Aug/14 ]

confirmed to be fixed in 14w32b

Comment by Luke [ 07/Aug/14 ]

I make many maps myself and i can say that if this bug is fixed, multiple games i have made and others have made will become broken...

Comment by Sam Bone [ 02/Aug/14 ]

/give @p ender_pearl 64 gives 4 separate stacked of 16, though.
Guess saying that was way useless, since someone else just said that. LOL I didn't notice.

Comment by Nate [ 05/Jul/14 ]

It doesn't seem to work with ender pearls, snowballs, eggs etc.. With those the command gives you 4 stacks of 16

Comment by Eric [ 27/Jan/14 ]

Thank you for the clarification. I have noticed that some people are asking for it to be removed, so I just wanted to add to that discussion with my opinion. As for the functions of game affected: some of them are useful, but are definitely not intended. Thanks again =)

Comment by [Mod] CubeTheThird [ 27/Jan/14 ]

@Eric, as stated in previous comments, this report is not to remove this functionality from the game (though that may be the case). The main issue is that it does not function properly with other game components, such as brewing stands and anvils. Durability values also are affected by this. If this issue is fixed, either it is removed, or other game elements are made to work with it. There is also the possibility of another solution not yet proposed to solve this.

Comment by Eric [ 27/Jan/14 ]

Currently they are adding more things to make mapmaking easier. This is something that makes many things easier. If it was to be removed, it would make certain things impossible, make mapmaking harder, and just going in the other direction. It is a useful feature that can easily be avoided. Many maps use stackable potions, and some mapmakers use the stackable feature to fill chests (Get a stack of something like swords or bows, hold right click, and drag across all chest spaces). If this is taken out, I will feel like a very useful feature has been removed. I believe that, even if not originally intended, this is now how it is liked by the community at large, including members of Mojang.

Comment by Kumasasa [ 26/Jan/14 ]

No.

Comment by Atom clark [ 26/Jan/14 ]

can some PLEASE close this as Works As Intended!

Comment by [Mod] Torabi [ 22/Oct/13 ]

And how would you know? You keep claiming to have knowledge of what some feature or another is "meant" to do, but as far as the rest of us can tell, it's just your opinion. You're not Mojang or in direct communication with them, and haven't ever provided any quotes or links to back up your statements.

This issue being listed on the tracker is a way of asking a member of Mojang about it. They've yet to share their opinion on it with us.

Comment by Atom clark [ 22/Oct/13 ]

if you were to ask a member of Mojang about this they would definitely say Works as Intended

Comment by Atom clark [ 11/Aug/13 ]

confirmed but please NEVER fix this bug

Comment by Eric [ 07/May/13 ]

I agree with Jesper that the /give command should stay the same, and if needed, the various things affected by it can have changed behavior. I like the idea that you can enchant a stack of swords at the same time, but maybe make it only in creative like the enchanting any item on an anvil bug was changed to. Some of these bugs/features can be used for cool effects or mapmaking, such as having overstrong redstone from the comparator going extra distance without delay, or easily enchanting tons of swords.

Comment by Jesper the End [ 07/May/13 ]

don't change the give command, that's just annoying. Instead change the behaviour with anvils brewing stands etc.

Comment by Jonathan Haas [ 05/May/13 ]

No, this doesn't make sense. If Mojang wants players to be able to get item stacks using give (which is a regular ingame feature), these stacks should work properly for example with anvils or other ingame features. If Mojang doesn't want players to get stacks for unstackable items they should adjust the give command. Players would still be able to stack unstackable items using modded clients or external tools.

Comment by Anonymous User [ 05/May/13 ]

This is not a bug. It's a feature that helps avoid using an inventory editor to stack unstackable things.

Comment by [Mod] CubeTheThird [ 21/Feb/13 ]

I am not suggesting that this behaviour should not be allowed, but rather that other game elements should work properly with it.

Comment by Jesper the End [ 17/Feb/13 ]

Why would you want to change this, if you don't want stacked items, then just don't give them. If you change this it will only take away possibilities for mapmakers.

Comment by Extreme [ 01/Jan/13 ]

There's not much more to say. I'm 99% sure this will remain untouched, but this issue will remain open until mojang or moderators close this.

Comment by Eric [ 01/Jan/13 ]

I'm just not seeing your side, sorry. =) I don't see it as an issue, as only the most trusted (hopefully) on a server can take advantage of it (or people in singleplayer). I use it a lot when I try (and fail) at making maps, especially before command blocks came out. I use it sometimes to perform a specific action many times quickly, such as /give-ing a stack of book-and-quill items and writing 64 books at the same time, or dying stacks of armor for PvP or other things. If I wanted to name a bunch of swords at the same time to make them easy to separate, I would /give a stack of swords, name all 64 in an anvil, then separate them. I'm sticking on the side of feature rather than bug, and feel free (Anon Ymus or others) to add more on either side.

Comment by Anon Ymus [ 01/Jan/13 ]

This is a pointless argument. Let's just agree to disagree.

Comment by Eric [ 01/Jan/13 ]

Then that's a problem for any op that's not good enough to hide illegitimate items. As an op on a server, I never leave command blocks sitting around, commands in, ready to be used by non-ops. I never leave stacks of unstackable items in my house or anywhere someone might pick them up to use them. If I do have a stack of such items, they are never easily useable for malicious purposes, such as a stack of lava buckets. If they are obtained by a non-op on another server, then it is mostly the op's fault, and they must deal with the damage. Same argument applies for taking out Tnt because a greifer might find some in an ops house. Again, correct me if I'm wrong and feel free to add input, I'm strongly on the side of keeping the /give command stackable, because I like adventure maps (or PvP or any type of map) and I feel like taking it out would make amateur adventure map makers less likely to try, or less likely to make them as well. (Edit: spelling and clarification)

Comment by Anon Ymus [ 01/Jan/13 ]

No one has to be helped by an op. Sneaking into an op's house or whatever and stealing their stacked items can cause these problems.

Comment by Eric [ 01/Jan/13 ]

With the furnace, it would be a feature. Nothing is lost by powering that furnace forever, especially since nobody can take advantage of it without operator status or help from an op. Having more than one bottle per slot in a brewing stand doesn't break anything, it just happens to give you a stack of potions for fewer ingredients (again, people are only able to take advantage of this with op or help from one). The anvil repair with fewer levels has the same answer, they can only get the stack of tools from an op(still). Even if they do, I've seen people use a stack of tools, and they wear away one at a time, only damaging the top tool in that stack. In effect, they're repairing only the top tool in the stack. Correct me if I'm wrong, and please give examples.

Comment by Anon Ymus [ 01/Jan/13 ]

Look at the description. There are two fine examples there. Also, a stack of buckets of lava can be used as fuel in a furnace, making it last almost indefinitely.

Comment by Extreme [ 01/Jan/13 ]

I don't think people are really understanding what the give command is... For one, the command isn't something new. It's been there since ALPHA. For one, how would they not realize this? They did. And they don't care. The command was meant for server admins since prior there was no creative. When they made the command they knew it had powers as such. What I don't understand about this is how it breaks game code. If you can give an example other than durability, than please do tell me.

Comment by [Mod] Torabi [ 01/Jan/13 ]

Then all other instances of item handling code that assume an item cannot stack should be modified to handle stacked items correctly, so that things like an entire stack being used/consumed/destroyed instead of a single item from the stack won't happen.

Comment by Eric [ 31/Dec/12 ]

In the example of the TF2 map, command blocks are used to /give the demo a stack of potions so that their inventory isn't full, and so that they can use them rapidly. It would break if the /give command is modified. It would also make it hard for anyone to make their own adventure map.

Comment by Anon Ymus [ 31/Dec/12 ]

I am suggesting that the GIVE command doesn't allow for illegal stacking, not that the game doesn't allow for illegal stacking.

Comment by Eric [ 31/Dec/12 ]

But you were suggesting making code so that those stacks wouldn't work. MCEdit is an external program, not a mod, so the game's code does not change. He also uses the /give command to give the "demo" class stacks of splash harming potions, so that would be broken. Thanks for the input, I'm open to more. =)

Comment by Anon Ymus [ 31/Dec/12 ]

Sethbling uses an MCEdit filter to fill the dispensers. Therefore, fixing this bug would still allow for TF2 maps, etc.

Comment by Eric [ 31/Dec/12 ]

This has been known for a long time, and I take advantage of it on my server to fill chests quickly (say, give myself a stack of swords and put one in each chest slot) or for dispensers that are to be used more than 9 times without refill (for armor and a written book). If this feature was taken out, it would disrupt many contraptions, such as SethBling's TF2 maps and my dispensers. The only way to take advantage of this bug is to be oped or be helped by an op. This is not available to everyone, so I see it as an operator's tool. If people want to use it in singleplayer, then they have the choice. Another use that I can see is that PvP maps (like SethBling's TF2 again) stack potions so that you don't have to dig in your inventory to find them all, or to save inventory space. SethBling's map uses it in a way that a certain class is able to throw potions rapid-fire style. To me, the the argument of it being "not natural" is comparable to being "not natural" on a survival server for ops to spawn in stacks of diamonds. Sorry if I ramble, please tell me if I'm wrong or if you disagree, please say why. =)

Comment by Anon Ymus [ 31/Dec/12 ]

The bug is not about being able to get multiple potions, etc. at a time, but instead about them stacking unrealistically.

Comment by Extreme [ 31/Dec/12 ]

That wouldn't be considered a bug. I just a side feature. rather than telling a command line block 50 times over and over to give a potion makes no sense. The feature has been in the game back with the release of MP and ever since single player was ported to multilayer people start calling every thing bugs... Let alone how many contraptions and map makers use this feature.

Comment by Anon Ymus [ 31/Dec/12 ]

That is what we have been saying.

Comment by [Mod] Torabi [ 31/Dec/12 ]

Some items are supposed to stack. Others are not. The /give command should not circumvent that, because it causes other code that does not expect stacked items to perform in unintended ways. That, or those other instances should be fixed to properly handle stacked items.

Comment by Anon Ymus [ 30/Dec/12 ]

Torabi, this is what is supposed to happen. As far as I can tell, /give to someone in survival mode does not stack, while doing it to someone in creative does cause stacking. It is strange to see a stack of 64 minecarts.

Comment by Extreme [ 30/Dec/12 ]

This is most likely intended, and many maps use this feature to their advantage.

Comment by [Mod] Torabi [ 24/Dec/12 ]

Why is everyone acting as if this must be an all or nothing feature? The command could be modified to check whether an item can stack or not, and respond appropriately. I think it would be nice if using /give with non-stackable items would give you all the items you asked for, but not in a single stack.

Comment by Idea Guy [ 06/Dec/12 ]

I think this should be made into a feature EXCLUSIVE to Creative Mode--items normally unstackable would stack in Creative Mode. This could help me save inventory space that I would rather use for other items.

Comment by Anon Ymus [ 22/Nov/12 ]

My point is that this functionality of the give command is inconsistent with the rest of the game. If this was intended, then people in creative should be able to stack anything. And this bug causes problems (especially with the brewing stand) because it allows you to do an action on a whole stack of things at once.

Comment by FireHunterX [ 22/Nov/12 ]

The give command has always given an entire stack of items, regardless of what item or block it is.
(The default server one, at least.)

This is intended, because the command can only be used with Cheats enabled, and if you want to play a survival world legitimately, then you wouldn't have turned them on anyways.

Comment by Josh Miller [ 22/Nov/12 ]

@Anon Ymus: Just because something isn't possible in the creative inventory doesn't mean that it is a bug.

I think it is a feature that can be used for map makers to fill dispensers with a lot of items so they don't run out quickly.

Comment by Eric [ 20/Nov/12 ]

It is well known and used in many maps. I do not want this to be taken out, because it would make map-making hard without third-party programs like MC-Edit.

Comment by Anon Ymus [ 20/Nov/12 ]

This is certainly a bug. It is not possible to stack items like this in the creative inventory. And anyone with a stack like this can transfer it to a chest, and then to someone else from there. Therefore, this is not op-exclusive.

Comment by Jonathan Haas [ 19/Nov/12 ]

Still, people are able to get stacks of items (either from ops or from any other way like server mods) and they do weird things with brewing stand and furnances. Either (non-OP) people should be prevented completely from getting stacks of unstackable items or anvils/brewing stands should be adjusted to not do silly things with these stacks.

Allowing people to get item stacks (using the /give command for example) and not react correctly to these stacks at different locations is obviously a bug.

Comment by Frederik Thiesen [ 19/Nov/12 ]

The /give command is an op command... the OP is God over the world... God can do anything he wishes. He can stack items the way he sees fit. Hence I don't think it's a bug.

Comment by Josh Miller [ 18/Nov/12 ]

I also don't think it's a bug, but a nice feature for map makers. Didn't even know it - Thanks!

Comment by Eric [ 18/Nov/12 ]

I don't think this is a bug. I think of it as a feature to stock many items at once, especially in a dispenser. It's great for maps and would break many (and the creation of many) if removed or "fixed." I may be wrong.

Generated at Sun Jan 12 12:01:14 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.