Creative Mode Item Duplication into hotbar
I was pulling items from the creative inventory to fill chests for making fireworks. When I filled up the survival inventory and exited out, to store them in the chest, I had an item duplicated in the hot bar.
What I expected to happen was...:
there to be a full survival inventory and nothing in the hot bar when I opened the chest.
What actually happened was...:
I had a full survival inventory with a duplicate of the item in the hot bar.
Steps to Reproduce:
1. Open up creative inventory and put any item(I tried it with quite a few items) in your hot bar.
2. Switch to the survival inventory by clicking the chest icon
3. Move the item(s) from the hot bar to the survival inventory
4. Exit out of your inventory.
5. Open a chest
6. There should be a duplicate of the item, that you placed into the survival inventory, in your hot bar.
Notes:
-Moving a block in any direction after exiting from the inventory before opening a chest breaks the bug.
-Where you place the item in the survival inventory has no affect.
-It seems to only duplicate the first item moved from the hot bar to the survival inventory. For example, move a stack of diamonds then a stack of gunpowder to the inventory and only the diamonds will duplicate.
-The location of the item on the hot bar before moving it to the inventory also has no affect.
-Shift clicking or dragging still produces the same bug.
-I know there are other bugs reported for duplicating but they all required repeatedly pushing buttons.
Environment
Windows 7 64bit, Java Version 7 Update 5
Linked Issues
is duplicated by54
relates to6
- Fixed
Alex Jennings
- 27
- 10
- Confirmed
- Creative
- creative creative-inventory drop duplication hotbar inventory item slot
1.4.6 - 18w03b
1.4.6 1.4.7 13w01b 13w07a 13w10b 1.5 1.5.2 1.6.2 1.6.4 1.7 1.7.1 1.7.2 1.7.4 14w05b 14w06b 14w07a 14w08a 1.7.5 14w19a 14w25b 1.7.10 14w32a 14w32b 14w32c 14w32d 1.8-pre2 1.8 1.8.7 15w33b 15w33c 15w39c 15w40b 15w41b 15w42a 15w44b 1.9-pre1 1.9 1.9.1-pre3 1.9.1 1.9.2 16w14a 1.9.4 1.10-pre2 1.10 1.10.2 16w32a 16w32b 16w33a 16w35a 16w42a 16w44a 1.11.2 1.12-pre6 1.12.1 1.12.2 18w03b- 1.13.1
Created Issue:
Creative Mode Item Duplication
I was pulling items from the creative inventory to fill chests for making fireworks. When I filled up the survival inventory and exited out, to store them in the chest, I had an item duplicated in the hot bar.
What I expected to happen was...:
there to be a full survival inventory and nothing in the hot bar when I opened the chest.What actually happened was...:
I had a full survival inventory with a duplicate of the item in the hot bar.Steps to Reproduce:
1. Open up creative inventory and put any item(I tried it with quite a few items) in your hot bar.
2. Switch to the survival inventory by clicking the chest icon
3. Move the item(s) from the hot bar to the survival inventory
4. Exit out of your inventory.
5. Open a chest
6. There should be a duplicate of the item, that you placed into the survival inventory, in your hot bar.Notes:
-Moving a block in any direction after exiting from the inventory before opening a chest breaks the bug.
-Where you place the item in the survival inventory has no affect.
-It seems to only duplicate the first item moved from the hot bar to the survival inventory. For example, move a stack of diamonds then a stack of gunpowder to the inventory and only the diamonds will duplicate.
-The location of the item on the hot bar before moving it to the inventory also has no affect.
-Shift clicking or dragging still produces the same bug.
-I know there are other bugs reported for duplicating but they all required repeatedly pushing buttons.Environment
Windows 7 64bit, Java Version 7 Update 5
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
Possible fix
Caveat, working on mostly obfuscated 1.5 code, so I might easily miss something important... Also, difficult to show the fixed code as there is no (good) common MCP naming to refer to at this point. Identifier names now used are my quick and very narrow interpretations/guesses.GuiContainerCreative// func_74191_a(Slot p_74191_1_, int p_74191_2_, int p_74191_3_, int p_74191_4_) protected void handleMouseClick(Slot slot, int slotNumber, int shiftPressed, int clickType) { ... if (selectedTabIndex == CreativeTabs.tabSurvivalInventory.getTabIndex()) { if (slot == this.trashSlot) { this.minecraft.player.inventory.setSomeStack((ItemStack) null); } else if (clickType == 4 && slot != null && slot.hasStack()) { //stack2 = slot.decStackSize(shiftPressed_maybe == 0 ? 1 : slot.getStack().getMaxStackSize()); //this.minecraft.player.dropExternalStack(stack2); //this.minecraft.playerController.setSomeCreativeDefaultSlot(stack2); // FIX? Adapted from GuiContainer (normal survival mode operation) // obfuscated method name 'func_78753_a' this.minecraft.playerController.atLeastContainerEventsUse(this.container.windowId, slotNumber, shiftPressed, 4, this.minecraft.player); } ... } // func_74227_b(CreativeTabs p_74227_1_) private void setCreativeTab(CreativeTabs tab) { ... if (tab == CreativeTabs.tabSurvivalInventory) { ... creativeContainer.slots = new ArrayList(); for (int pfcSlotIndex = 0; pfcSlotIndex < playersFullContainer.slots.size(); ++pfcSlotIndex) { SlotCreativeInventory specialSlot = new SlotCreativeInventory(this, (Slot) playersFullContainer.slots.get(pfcSlotIndex), pfcSlotIndex); creativeContainer.slots.add(specialSlot); // FIX? Adapted from Container.addSlotToContainer() (or func_75146_a()) specialSlot.slotNumber = pfcSlotIndex; ... }Changes tested on 1.5, and seems to work as expected. Didn't look for side-effects, and didn't test full multiplayer.
While at it, I'd give another look at the code right below the now fixed part, as they are also manipulating the survival inventory, yet use that same method that leaves slot to '-1', or seem to use slot number (while it is always 0). (Who knows, maybe some of those are behind the duplication issues during merchant access.)
Background
The problem had two parts.First one was that the server is sent a packet which does not reveal which slot is being pointed (so it can not adjust its own idea of quantity) while client-side happily adjusts its own local stack and throws out a new item (which is apparently registered both on client and server sides). Once another operation is done, the server will send back data based on its own, unmodified quantity, and client updates its quantity to the server's one. Duplication achieved. With various funny side-effects (as illustrated by the many duplicates etc.)
The second part was part of the fixing process. The relevant method was receiving incorrect slot numbers, as they were not initialized properly. Getting the correct slot number is needed so that it can be sent to the server.
is duplicated by
relates to
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
relates to
is duplicated by
relates to
is duplicated by
is duplicated by
is duplicated by
I was pulling items from the creative inventory to fill chests for making fireworks. When I filled up the survival inventory and exited out, to store them in the chest, I had an item duplicated in the hot bar.
What I expected to happen was...:
there to be a full survival inventory and nothing in the hot bar when I opened the chest.What actually happened was...:
I had a full survival inventory with a duplicate of the item in the hot bar.Steps to Reproduce:
1. Open up creative inventory and put any item(I tried it with quite a few items) in your hot bar.
2. Switch to the survival inventory by clicking the chest icon
3. Move the item(s) from the hot bar to the survival inventory
4. Exit out of your inventory.
5. Open a chest
6. There should be a duplicate of the item, that you placed into the survival inventory, in your hot bar.Notes:
-Moving a block in any direction after exiting from the inventory before opening a chest breaks the bug.
-Where you place the item in the survival inventory has no affect.
-It seems to only duplicate the first item moved from the hot bar to the survival inventory. For example, move a stack of diamonds then a stack of gunpowder to the inventory and only the diamonds will duplicate.
-The location of the item on the hot bar before moving it to the inventory also has no affect.
-Shift clicking or dragging still produces the same bug.
-I know there are other bugs reported for duplicating but they all required repeatedly pushing buttons.Another way is this:
1. Be in creative, /clear to make sure your inventory is empty
2. /give @p stone 64
3. Hover-drop the stack
4. Pick up the stack from the ground (Note how the items now go in the second hotbar slot, the first slot is occupied with the client-invisible original stack)
5. Run /clear, note how 128 items have been cleared from your inventory
is duplicated by
is duplicated by
I was pulling items from the creative inventory to fill chests for making fireworks. When I filled up the survival inventory and exited out, to store them in the chest, I had an item duplicated in the hot bar.
What I expected to happen was...:
there to be a full survival inventory and nothing in the hot bar when I opened the chest.What actually happened was...:
I had a full survival inventory with a duplicate of the item in the hot bar.Steps to Reproduce:
1. Open up creative inventory and put any item(I tried it with quite a few items) in your hot bar.
2. Switch to the survival inventory by clicking the chest icon
3. Move the item(s) from the hot bar to the survival inventory
4. Exit out of your inventory.
5. Open a chest
6. There should be a duplicate of the item, that you placed into the survival inventory, in your hot bar.Notes:
-Moving a block in any direction after exiting from the inventory before opening a chest breaks the bug.
-Where you place the item in the survival inventory has no affect.
-It seems to only duplicate the first item moved from the hot bar to the survival inventory. For example, move a stack of diamonds then a stack of gunpowder to the inventory and only the diamonds will duplicate.
-The location of the item on the hot bar before moving it to the inventory also has no affect.
-Shift clicking or dragging still produces the same bug.
-I know there are other bugs reported for duplicating but they all required repeatedly pushing buttons.Another way is this:
1. Be in creative, /clear to make sure your inventory is empty
2. /give @p stone 64
3. Hover-drop the stack
4. Pick up the stack from the ground (Note how the items now go in the second hotbar slot, the first slot is occupied with the client-invisible original stack)
5. Run /clear, note how 128 items have been cleared from your inventoryThis also includes right clicking to equip armor in creative mode shortly making the armor item disappear.
is duplicated by
is duplicated by
relates to
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
relates to
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
I was pulling items from the creative inventory to fill chests for making fireworks. When I filled up the survival inventory and exited out, to store them in the chest, I had an item duplicated in the hot bar.
What I expected to happen was...:
there to be a full survival inventory and nothing in the hot bar when I opened the chest.What actually happened was...:
I had a full survival inventory with a duplicate of the item in the hot bar.Steps to Reproduce:
1. Open up creative inventory and put any item(I tried it with quite a few items) in your hot bar.
2. Switch to the survival inventory by clicking the chest icon
3. Move the item(s) from the hot bar to the survival inventory
4. Exit out of your inventory.
5. Open a chest
6. There should be a duplicate of the item, that you placed into the survival inventory, in your hot bar.Notes:
-Moving a block in any direction after exiting from the inventory before opening a chest breaks the bug.
-Where you place the item in the survival inventory has no affect.
-It seems to only duplicate the first item moved from the hot bar to the survival inventory. For example, move a stack of diamonds then a stack of gunpowder to the inventory and only the diamonds will duplicate.
-The location of the item on the hot bar before moving it to the inventory also has no affect.
-Shift clicking or dragging still produces the same bug.
-I know there are other bugs reported for duplicating but they all required repeatedly pushing buttons.Another way is this:
1. Be in creative, /clear to make sure your inventory is empty
2. /give @p stone 64
3. Hover-drop the stack
4. Pick up the stack from the ground (Note how the items now go in the second hotbar slot, the first slot is occupied with the client-invisible original stack)
5. Run /clear, note how 128 items have been cleared from your inventoryThis also includes right clicking to equip armor in creative mode shortly making the armor item disappear.
Creative Mode Item Duplication into hotbar
relates to
is duplicated by
I was pulling items from the creative inventory to fill chests for making fireworks. When I filled up the survival inventory and exited out, to store them in the chest, I had an item duplicated in the hot bar.
What I expected to happen was...:
there to be a full survival inventory and nothing in the hot bar when I opened the chest.What actually happened was...:
I had a full survival inventory with a duplicate of the item in the hot bar.Steps to Reproduce:
1. Open up creative inventory and put any item(I tried it with quite a few items) in your hot bar.
2. Switch to the survival inventory by clicking the chest icon
3. Move the item(s) from the hot bar to the survival inventory
4. Exit out of your inventory.
5. Open a chest
6. There should be a duplicate of the item, that you placed into the survival inventory, in your hot bar.Notes:
-Moving a block in any direction after exiting from the inventory before opening a chest breaks the bug.
-Where you place the item in the survival inventory has no affect.
-It seems to only duplicate the first item moved from the hot bar to the survival inventory. For example, move a stack of diamonds then a stack of gunpowder to the inventory and only the diamonds will duplicate.
-The location of the item on the hot bar before moving it to the inventory also has no affect.
-Shift clicking or dragging still produces the same bug.
-I know there are other bugs reported for duplicating but they all required repeatedly pushing buttons.
relates to
Duplicate of MC-5415, please use the search function to see if your bug has already been submitted. Currently over 51% of tickets are being closed as duplicate.
Duplicate of MC-5415, please use the search function to see if your bug has already been submitted. Currently over 53% of tickets are being closed as duplicate.
Hmm.. duplicate of MC-5415? (See especially MC-6832). It might be that these various methods of duplication related to reducing stack size in creative intentory are just symptoms of the same bug.
Also, I dug into the relevant code, and seems the relevant code is decreasing the count on the 'slot' the method has been provided with (client side thing), but when it sends a packet to server, the packet is one that defines the slot as constant '-1'. Server doesn't know which slot to adjust (or adjusts some wrong slot?) and thus the server side count is kept unchanged.
Once the player e.g. presses 'Q' outside inventory, a normal packet to handle that is sent to server, which then returns its idea of the quantity to the client. That quantity will be naturally original quantity - 1.
I think I need to continue on the 5415...
Duplicate of MC-5415, please use the search function to see if your bug has already been submitted. Currently over 54% of tickets are being closed as duplicate.
See Markku's comment in MC-12053
Duplicate of MC-5415, please use the search function to see if your bug has already been submitted. Currently over 54% of tickets are being closed as duplicate.
The resolution field applies to the issue report, not the bug itself.
This issue report is resolved. The resolution is that it's a duplicate report of MC-5415. If you examine that report, its status is Unresolved. So while the bug has not been fixed, as indicated by MC-5415, this issue report is closed, and further comments on the bug should be posted at MC-5415. Also, if you voted for this issue to be fixed, you should go vote on MC-5415. Votes do not currently transfer from the duplicate issue to the it is marked a duplicate of, as per JRA-3731, so if you want the issue fixed, you should vote for the issue this has been marked a duplicate of.
Duplicate of MC-5415, please use the search function to see if your bug has already been submitted. Currently over 55% of tickets are being closed as duplicate.
Duplicate of MC-5415, please use the search function to see if your bug has already been submitted. Currently over 57% of tickets are being closed as duplicate.
Duplicate of MC-5415, please use the search function to see if your bug has already been submitted. Currently over 57% of tickets are being closed as duplicate.
Duplicate of MC-5415, please use the search function to see if your bug has already been submitted. Currently over 56% of tickets are being resolved as duplicate.
Duplicate of MC-5415, please use the search function to see if your bug has already been submitted. Currently over 57% of tickets are being resolved as duplicate.
Duplicate of MC-5415.
Duplicate of MC-5415
Dupe of MC-5415
Which would make the intended behavior "armor moves to armor slot" instead of "armor is copied to armor slot" - which really makes more sense to me. In that case, it's most likely MC-5415. Resolving.
Looks like MC-5415, assuming creative mode. Cannot reproduce in survival.
It's not just creative mode; I've seen MC-5415 happen as well. This is across gamemodes. I've personally experienced it in creative mode, and I've had reports of it happening in survival. Furthermore, I had no trouble with this before 15w42a. Thus, this is a new bug and should be treated accordingly.
Sounds like some variation of MC-5415.
Duplicate of (inadequately explained) MC-5415.
Dupe of MC-5415
Attempting to drop an item when in creative will result in that "dropped" item being dropped back into the unlimited items which I think is actually normal because when you take an item from the creative inventory and try to drop it in said inventory, it does delete the item anyway. To drop an item to the ground from the creative inventory you would have to click on your inventory and ctrl+q but there is a bug where if you do this the items double here MC-5415 . As far as the item not showing up on the ground, i think this is actually not really a bug. But perhaps as qmagnet suggested, these two tickets might actually be related in some way?
Dupe of MC-5415
Dupe of MC-5415
Thank you for your report!
However, this issue has been closed as a Duplicate of MC-5415.
It has been linked to this report. If you have additional information, please add it to that report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
After trying more than 20 times, I was unable to replicate the duplication myself.
Could be related to/duplicated by MC-5415


Cannot reproduce.Confirmed.
-
> -no grass block in the chestGrass block in the hot bar and in the slot above.See screenshots
What mods do you have installed ?
Please do not mark issues as private, unless your bug report is a security issue containing information that may compromise your server/client.
The duplicated block shows up in the hot bar, not the chest. I apologize for not making that more clear. If you didn't move the grass block after the first screenshot then you shouldn't have had the grass block in your hot bar and inventory in the second screen shot.
As for the mods I had rei's minimap installed then I did a forced update and it still happened.
OMG. Sorry not seeing that bug.
Of course is the grass block duplicated in my inventory, one in the hot bar, one above.
I'd always looked in the chest.
Yea it's strange. I've also tried it in survival but i couldn't replicate it there. It only happens when pulling from the creative inventory.
Unable to reproduce
I've reproduced it on 3 separate computers and [Mod] Kumasasa reproduced it.
The only thing you could've done to not be able to reproduce it is move a block in any direction, after exiting the inventory, before opening the chest.
Or you just didn't follow my directions right.
Also confirmed, made a youtube video of it..
http://www.youtube.com/watch?v=JcDRiPGADiA
Thank you Richard.
Ah, now I got it to work. thanks, richard!
Can't get it to work in 13w01b.
May be fixed.
Can still reproduce with 13w01b.
Stick to my steps above. (edit: swapped the first two steps)
Works with all blocks with a GUI except Minecart with Chest. I first found this while enchanting and using enchanted books, as I was about to report. I've always needed 5 items in the hotbar and needed to shift click them before opening a chest/beacon block/anvil etc...
Minecraft 1.4.7
**Edit: This doesn't only occur when opening a GUI block. While testing this bug, I found that instead of opening the chest (for example) reopen your inventory and close it. It works sometimes.
Therefor, this might even work when opening villager GUI. I believe there are already some bugs on the bug tracker reported with villagers.
Possible fix
Caveat, working on mostly obfuscated 1.5 code, so I might easily miss something important... Also, difficult to show the fixed code as there is no (good) common MCP naming to refer to at this point. Identifier names now used are my quick and very narrow interpretations/guesses.
Changes tested on 1.5, and seems to work as expected. Didn't look for side-effects, and didn't test full multiplayer.
While at it, I'd give another look at the code right below the now fixed part, as they are also manipulating the survival inventory, yet use that same method that leaves slot to '-1', or seem to use slot number (while it is always 0). (Who knows, maybe some of those are behind the duplication issues during merchant access.)
Background
The problem had two parts.
First one was that the server is sent a packet which does not reveal which slot is being pointed (so it can not adjust its own idea of quantity) while client-side happily adjusts its own local stack and throws out a new item (which is apparently registered both on client and server sides). Once another operation is done, the server will send back data based on its own, unmodified quantity, and client updates its quantity to the server's one. Duplication achieved. With various funny side-effects (as illustrated by the many duplicates etc.)
The second part was part of the fixing process. The relevant method was receiving incorrect slot numbers, as they were not initialized properly. Getting the correct slot number is needed so that it can be sent to the server.
Affects 1.6 as well, right up to 1.6.2.
Considering all methods of creative item duplication have been closed as "duplicates" of this, I'll just throw this one out there:
If you're in the survival inventory tab, in Creative mode, and you Ctrl+Q to drop the item you're hovering over, you'll seem to drop the stack, but in reality you just dropped a duplicate stack. When your inventory updates (e.g. from picking up an item or relogging), you'll see the original stack is still there, and the dropped stack is real and can be picked up.
This is most easily demonstrated by looking straight down and Ctrl+Q-ing items. You'll pick up the duplicate stacks, and it will seem as though you dropped the whole stack and picked up twice as many items.
This bug can also cause inventory desynchronization, where entire stacks in your inventory remain invisible until you re-log.
Still effects 1.7 prerelease
Yep, still an issue in 14w08a (and 1.7.4)
If anyone is looking to INTENTIONALLY duplicate items in creative (for example if you have armor/weapons that have just the right enchantments) try one of the following 2 methods (both intentional features rather than bugs):
1) Putting something into an item frame while in creative causes the item to appear in the frame but still be in your hand at the same time (the one in the frame is a dupe). To get it back out of the frame you have to switch back to survival, however you can do this with a bunch of frames so that you're not switching gamemodes back and forth constantly for large numbers of items.
2) The second way is using the feature that lets you put armor into your hotbar and click on it there to equip it. You make it the currently selected item in the hotbar and hit the mouse button. Doing this in creative equips a duplicate of the armor while keeping the original in your hotbar. Doesn't work with non-armor items of course.
Actually, you can use pick block (bound by default to middle click) on an item to duplicate it, enchantments and all.
Yeah, all creative duplication methods could probably be resolved as invalid: you can middle-click it to dupe a full stack of identical copies.
I think the point is that there's a mismatch between what you think you've done to the inventory, and what has actually happened to it, rather than an exploit you could use in survival to cheat.
Confirmed for 14w32d. This also works
This may be related to
MC-23039Confirmed for:
Confirmed for 1.8.
Confirmed for 1.9-pre1
@Kumasasa I can confirm for 1.9.1 pre 3.
What I have noticed: I continued this until it wouldn't show anymore items in my inventory even though I would pick up items, they don't appear in the inventory. Clearing my inventory /clear @p it said removed 2112 items even though there was nothing there. Pressing ctrl+q hovering the item then picking it up does indeed double it. It will attempt to double a FULL stack which causes the "Invisible entity" items to take up room in the inventory. shift clicking the delete item button gets rid of them as well as /clear @p. Yes only happens in Creative mode, not survival or adventure. IF you remove your visible items, then "invisible" items are gone. The "invisible" items will remain in the inventory until all visible items are deleted or removed. (This means that the game possibly thinks its all ONE stack of items) Happens when viewing inventory in said creative mode. ALSO ctrl+q hovering over the item, then picking back up, then entering a chest, the "invisible" items will appear!!
CONCLUSION: The bug is caused by an attempt to duplicate a FULL stack of items, this includes a water/lava bucket/minecart etc. Since it cannot go above 64, it glitches out and causes these "ghost" entities. Hope this helps!
EDIT: I actually find this glitch useful in that it helps me duplicate items faster than pressing pick block on a single stack. Just saying, it could be turned into a sort of useful feature, in my opinion!
Confirmed for 1.9.2 and 1.9.1, some people may just search for them (as I did).
It's not necessary to have the items in the hotbar first.
Also works the other way around: Take something from the creative inventory (list), don't put it somewhere, but throw it out (hover over the list and press the drop key or click on an item and click outside UI). Pick the item up (doesn't matter if you close the inventory in the meantime). Then switch to the "survival inventory" (still in creative): The item is not there. Open an external inventory, item appears in your inventory.
Still in 1.10-pre2
I've just reproduced the second method mentioned in the description in 1.10.2 and also made a video about some more weirdness connected to it:
https://www.dropbox.com/s/akgxf1iqve2pbda/2016-06-25%2022-48-24.mp4
Cannot reproduce in 1.12 & 1.12.1, fixed?
Cannot reproduce for 1.13.1.
Since there are no new reports for this issue coming in, assuming fixed.