[MC-2912] Creative Mode Hotbar Glitch when using Number Key to exchange items slots Created: 13/Nov/12  Updated: 26/Nov/17  Resolved: 17/Oct/16

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2, Minecraft 1.4.4, Snapshot 12w50a, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w09a, Snapshot 13w09b, Snapshot 13w09c, Minecraft 1.5, Minecraft 1.5.1, Minecraft 1.5.2, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 13w42b, Minecraft 13w43a, Minecraft 1.7.1, Minecraft 1.7.2, Minecraft 1.7.4, Minecraft 14w02c, Minecraft 14w03b, Minecraft 14w04a, Minecraft 14w04b, Minecraft 14w05a, Minecraft 14w05b, Minecraft 14w08a, Minecraft 1.7.5, Minecraft 14w10c, Minecraft 14w11b, Minecraft 1.7.6-pre1, Minecraft 1.7.6-pre2, Minecraft 1.7.9, Minecraft 14w17a, Minecraft 14w18b, Minecraft 14w21b, Minecraft 14w25a, Minecraft 14w25b, Minecraft 1.7.10, Minecraft 1.8, Minecraft 1.8.1-pre4, Minecraft 1.8.1, Minecraft 1.8.2-pre1, Minecraft 1.8.3, Minecraft 1.8.4, Minecraft 1.8.5, Minecraft 1.8.6, Minecraft 1.8.8, Minecraft 15w32b, Minecraft 15w32c, Minecraft 15w34a, Minecraft 15w34b, Minecraft 15w35b, Minecraft 15w36d, Minecraft 15w37a, Minecraft 15w39b, Minecraft 15w40b, Minecraft 15w41b, Minecraft 15w42a, Minecraft 15w43b, Minecraft 15w43c, Minecraft 15w44a, Minecraft 15w44b, Minecraft 15w45a, Minecraft 15w46a, Minecraft 15w47a, Minecraft 15w47c, Minecraft 15w49b, Minecraft 1.8.9, Minecraft 15w51b, Minecraft 16w06a, Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 16w21a, Minecraft 16w21b, Minecraft 1.10 Pre-Release 1, Minecraft 1.10, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w35a, Minecraft 16w38a, Minecraft 16w39b, Minecraft 16w40a
Fix Version/s: Minecraft 16w41a

Type: Bug
Reporter: LBBO Assignee: [Mojang] Agnes Larsson
Resolution: Fixed Votes: 38
Labels: block, hotbar, numberkey
Environment:

OS: Windows XP Build 2600 Service Pack 3,
OS: Windows 8, Java: 1.7.0_51


Issue Links:
Duplicate
is duplicated by MC-6543 Item Duplication Resolved
is duplicated by MC-6667 Blocks are disappearing after being p... Resolved
is duplicated by MC-10722 Ghost Items In Creative Resolved
is duplicated by MC-12197 Item Duplication in Hotbar and in World Resolved
is duplicated by MC-15814 Milk Buckets and Item Hot-switching Resolved
is duplicated by MC-17076 CobbleStone placement glitch Resolved
is duplicated by MC-17722 Using numbers to quick switch items i... Resolved
is duplicated by MC-17998 when switching bocks on creative in y... Resolved
is duplicated by MC-20027 In Creative Gamemode, if i use number... Resolved
is duplicated by MC-20040 Item duplicates with 1-9 swap keys an... Resolved
is duplicated by MC-21640 Duplication glitch Resolved
is duplicated by MC-22332 Inventory Bug Resolved
is duplicated by MC-26696 block duplicating while changing the ... Resolved
is duplicated by MC-27579 Items in inventory being deleted Resolved
is duplicated by MC-35975 changing block inventory spot with nu... Resolved
is duplicated by MC-38138 using shortcut with 1-9 in hotbar rem... Resolved
is duplicated by MC-38423 Duplicate items in minecraft 1.7.2 on... Resolved
is duplicated by MC-40221 Item switch glitch Resolved
is duplicated by MC-41616 Using number keys to move items aroun... Resolved
is duplicated by MC-42284 Block and Item Duplication/Replacemen... Resolved
is duplicated by MC-42636 Obscure bug causes items to vanish co... Resolved
is duplicated by MC-44452 Ghost items in creative when moving i... Resolved
is duplicated by MC-46872 SERIOUS HOT-BAR BUG Resolved
is duplicated by MC-46894 Can still break blocks with sword in ... Resolved
is duplicated by MC-47247 Hotbar Duplication bug Resolved
is duplicated by MC-50071 Block disapearence Resolved
is duplicated by MC-50493 Item Glitch in Creative Resolved
is duplicated by MC-51599 Break Blocks With Sword In Creative Resolved
is duplicated by MC-52447 Stonme disappears when I place it Resolved
is duplicated by MC-54743 Inventory 'Ghost Item' Glitch Resolved
is duplicated by MC-54882 Block dissapearing when shifted in in... Resolved
is duplicated by MC-55696 Moving blocks in creative inventory w... Resolved
is duplicated by MC-57049 Block Duplication Glitch in 14w25a Sn... Resolved
is duplicated by MC-63629 Switching a sword with number keys al... Resolved
is duplicated by MC-74030 Can shoot using arrows using sword Resolved
is duplicated by MC-75275 Command blocks glitching in hotbar Resolved
is duplicated by MC-76903 Shooting arrows with the sword Resolved
is duplicated by MC-82214 Creative Hotbar Swapping Bug Resolved
is duplicated by MC-84713 Switching Items in Hotbar by Keyboard Resolved
is duplicated by MC-85303 Using Number Keys to Switch Items in ... Resolved
is duplicated by MC-85553 Problem with switching items in inven... Resolved
is duplicated by MC-86653 Switching blocks within creative hotb... Resolved
is duplicated by MC-86982 Dragon Head Placement w/ No Item Sele... Resolved
is duplicated by MC-87202 the problem with rolled items in the ... Resolved
is duplicated by MC-87614 Hotbar Bug Resolved
is duplicated by MC-90276 Hoe Bug. Resolved
is duplicated by MC-91870 Spawn egg acts like item you swap with! Resolved
is duplicated by MC-92206 Using numbers to move objects in hotb... Resolved
is duplicated by MC-92248 Swap Items Bug - 15w45a Resolved
is duplicated by MC-92654 Selected Item's Attribute Modifiers N... Resolved
is duplicated by MC-94117 Creative quick slots bug Resolved
is duplicated by MC-94539 Sword Destroy Block In Creative Resolved
is duplicated by MC-96085 Bow Glitch Resolved
is duplicated by MC-97041 Sword Bug Resolved
is duplicated by MC-99099 Inventory Update (moving items with #... Resolved
is duplicated by MC-99326 Switching items with the number keys ... Resolved
is duplicated by MC-99551 Bug when swap items in creative mode Resolved
is duplicated by MC-102349 Can break blocks in creative w/ sword Resolved
is duplicated by MC-102876 Switching Items in hotbar using numbe... Resolved
is duplicated by MC-102883 Wrong block placed when hotbar order ... Resolved
is duplicated by MC-103925 bloc placing probleme while bloc solt... Resolved
is duplicated by MC-104644 Using hotbar keys can create ghost items Resolved
is duplicated by MC-104646 Using the 1-9 keys to move blocks in ... Resolved
is duplicated by MC-105890 Minecraft bone meal bug Resolved
is duplicated by MC-106184 Creative Mode Graphical Item Glitch/Bug Resolved
is duplicated by MC-106373 Blocks not placing after using 1-9 ke... Resolved
is duplicated by MC-106491 Block-Switch Placement Bug Resolved
is duplicated by MC-106736 Ghost Block Command Block Glitch Resolved
is duplicated by MC-106994 Pressing 1-9 to swap items makes the ... Resolved
is duplicated by MC-108119 Block incorect after rearranging bloc... Resolved
is duplicated by MC-108494 Placing wrong block after using hotke... Resolved
is duplicated by MC-108543 Item swap Resolved
is duplicated by MC-3161 Block disappears when placed in creative Resolved
is duplicated by MC-4541 Items in hotbar disapears after right... Resolved
is duplicated by MC-5138 Number Clicking Resolved
Relates
relates to MC-26716 Number keys not directly switching it... Resolved
relates to MC-341 Duplication and deletion of hotbar it... Resolved
relates to MC-122417 Ghost Block Number Fast-hotbaring Open
relates to MC-86455 Pick-block creates ghost items in Cre... Resolved
relates to MC-87019 Only visible slots are updated client... Resolved
relates to MC-97819 Weird ghost items when items are pick... Resolved
relates to MC-116622 Sometimes blocks from creative invent... Resolved
CHK:
Confirmation Status: Confirmed
Game Mode: Creative

 Description   

In creative mode, when I place a water bucket (for example) in Hotbar slot, hover above it and press a numberkey to move the it (i.e. to swap it with a dirt block) and then place the water bucket (which is now where the dirt block was and vice versa), it will place dirt. Not water. Placing dirt works as expected. Also works vice versa.

Steps to reproduce:

Example using water bucket
1. Put a water bucket in your hotbar. (i.e. 1st slot)
2. Press any number key (1-9) while hovering over water bucket, except its own slot number. (In this case 1.) Example : Dirt is in 2nd slot so press '2' and swap dirt and water bucket.
3. Place water bucket.
4. Water bucket is seems to be placed and is instantly replaced by dirt.
5. Open inventory to fix problem. If you are holding the water bucket in your hand it will be animated as if it was beeing swapped.

This apparently happens with all blocks. I haven't fully tested yet. It also works with having nothing instead of dirt, then water is placed for a short moment and instantly replaced by air. Also works with potions.


Code analysis by Marcono1234 can be found in this comment



 Comments   
Comment by [Mod] Neko [ 26/Oct/16 ]

HalfOfAKebab, that looks like MC-5694.

Comment by HalfOfAKebab [ 26/Oct/16 ]

I think this bug has returned in as a deadlier strain, so to speak. Since around 16w40a, I've experienced (albeit rarely) a similar bug in survival. Here's a video I stumbled across of this bug occuring: https://www.youtube.com/watch?v=Oupg58gOiZk (skip to 21:49s). This could possibly be a very detrimental bug, as, as you can see in the video, the block you're trying to place is consumed despite not being placed, and the block that is actually placed is not consumed. If this could be consistently reproduced, this could be a very bad duplication bug. For example, we could "try" to place a block of dirt and instead have a block of diamond placed, with the dirt being taken from the hotbar and the block of diamond not, basically turning dirt to diamond.

Comment by Fabian Röling [ 17/Oct/16 ]

Ok, apparently this is fixed. I was confused by buggy weirdness.
I can't confirm the fix myself, because apparently this is something I never encountered. But if other people say that this is fixed, it apparently is.

Comment by [Mod] Neko [ 17/Oct/16 ]

Also cannot reproduce. FaRoGaming, does MC-341 describe your issue?

Comment by Fabian Röling [ 17/Oct/16 ]

Number keys exchange slots. That's what this bug is about. 1, 2, 3 and 4 are number keys.
I just tested and was able to duplicate/delete so much that 3 of 4 slots contained the same item at the end.

Comment by [Mod] violine1101 [ 17/Oct/16 ]

FaRoGaming I don't fully understand what you want to achieve with typing "123412341234" etc. Can you explain what you're actually doing with your external program? I cannot reproduce this bug anymore either by the way.

Comment by Fabian Röling [ 17/Oct/16 ]

I always use an external program to test it. It automatically writes the "text" 1234123412341234..., but it should also be reproducable by rolling your head over the num pad.
Success rate has gone from once every few hundred repetitions of "1234" before 41a to now once every ~3.000 repetitions. Not really a huge issue, but one time I also got it without trying, during normal playing.

Comment by [Mojang] Agnes Larsson [ 17/Oct/16 ]

Do you have any steps on how to reproduce it in 16w41a? Because I can't reproduce it since 16w40a... Thank you!

Comment by Fabian Röling [ 13/Oct/16 ]

Nope, not fixed in 16w41a. Seems to appear a bit less, but it's not fixed.

Comment by user-f2760 (Inactive) [ 10/Oct/16 ]

It's not fixed in 16w40a, just checked to be sure.

Comment by Synthestra [ 10/Oct/16 ]

Fixed in 16w40a.

Comment by Marcono1234 [ 01/Oct/16 ]

Please link to this comment in the description

The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

The reason for this is probably that the method net.minecraft.client.gui.inventory.GuiContainerCreative.handleMouseClick(Slot, int, int, ClickType) only sends one slot update. The problem in general is that the creative GUI does not use the same inventory mechanics as the survival inventory, which means it has to send a slot update every time instead of having the server do some of the work.

Comment by [Mod] violine1101 [ 20/Sep/16 ]

Still in 16w38a.

Comment by [Mod] violine1101 [ 01/Sep/16 ]

Still in 16w35a.

Comment by [Mod] bemoty [ 19/Aug/16 ]

Still happens in 16w33a.

Comment by user-f2760 (Inactive) [ 14/Aug/16 ]

They're already marked as related, so it doesn't really matter that much.

Comment by [Mod] Pokechu22 [ 14/Aug/16 ]

Is it necessary to relink every report? I've seen other tickets which are duplicates but still have other duplicates linked to it. Though it would still be a bit confusing.

Comment by user-f2760 (Inactive) [ 14/Aug/16 ]

It is already marked as related, and resolving this one to that is too much work, really (relinking every single report).

Comment by [Mod] bemoty [ 14/Aug/16 ]

Duplicate of MC-341.
Since MC-341 is older than MC-2912, MC-2912 can be resolved then. (I guess)

Comment by null (Inactive) [ 10/Aug/16 ]

Yeah, I think this is a duplicate of MC-341.

Comment by Fabian Röling [ 16/Jul/16 ]

Wait, isn't this the same as MC-341, not only related?

Comment by Fabian Röling [ 16/Jul/16 ]

Btw, I was able to reproduce it now. I made another program spam the number keys really, really fast. But I can only reproduce it that way.

Comment by [Mod] Neko [ 29/Jun/16 ]

Odd, I can reproduce using the same steps you're using.

Comment by Fabian Röling [ 29/Jun/16 ]

Can't confirm in 1.10.2, although someone else apparently could (duplicate). What do I do wrong?
https://www.dropbox.com/s/ylyvhlsqwaqo87r/2016-06-29%2004-34-51.mp4?dl=0

Comment by [Mod] violine1101 [ 09/Jun/16 ]

Still in 1.10

Comment by [Mod] violine1101 [ 02/Jun/16 ]

Still in 1.10-pre1

Comment by [Mod] violine1101 [ 25/May/16 ]

Still in 16w21a and 16w21b

Comment by [Mod] Les3awe [ 21/May/16 ]

Confirmed for 16w20a

Comment by Ray [ 11/May/16 ]

Confirm 1.9.4.
https://gyazo.com/429bf157638f50a8c04b0673c7dcc1f1

Comment by [Mod] violine1101 [ 10/May/16 ]

Still in 1.9.4

Comment by Mario Fridrichovsky [ 10/Apr/16 ]

still persistent in 1.9.2

Comment by Steven W.d.V. [ 18/Feb/16 ]

Confirmed for 1.9-pre1 and 1.9-pre2.
Also, some weird thing I noticed: the items are actually swapped when closing and opening the inventory (pickup animation plays).

Comment by SunCat [ 13/Feb/16 ]

Confirmed for 16w06a

Comment by [Mod] violine1101 [ 05/Dec/15 ]

Confirmed for 15w49b.

Comment by Steven W.d.V. [ 18/Nov/15 ]

Confirmed for 15w47a and 15w47c

Comment by Swekob [ 15/Nov/15 ]

Confirmed for 15w46a

Comment by Steven W.d.V. [ 05/Nov/15 ]

Confirmed for 15w45a

Comment by Steven W.d.V. [ 28/Oct/15 ]

Confirmed for 15w44a and 15w44b

Comment by Steven W.d.V. [ 22/Oct/15 ]

Confirmed for 15w43b and 15w43c

Comment by WesselH [ 14/Oct/15 ]

Can confirm for 15w42a

Comment by Steven W.d.V. [ 14/Oct/15 ]

Confirmed for 15w42a

Comment by Steven W.d.V. [ 07/Oct/15 ]

Still happening in 15w41b

Comment by Steven W.d.V. [ 30/Sep/15 ]

Still present in 15w40b

Comment by Steven W.d.V. [ 21/Sep/15 ]

Confirmed for 15w39b, but does not always happen.

Comment by [Mod] Neko [ 16/Sep/15 ]

Confirmed for 15w37a

Comment by [Mod] Neko [ 20/Aug/15 ]

Confirmed for 15w34b

Comment by Matthew Cohen [ 08/Aug/15 ]

confirmed 15w32c

Comment by [Mod] Sonicwave [ 07/Aug/15 ]

Confirmed for 15w32b.

Comment by [Mod] Sonicwave [ 25/May/15 ]

Confirmed for 1.8.4, 1.8.5 and 1.8.6.

Comment by [Mod] violine1101 [ 27/Mar/15 ]

Confirmed for 1.8.3 Singleplayer.

Comment by [Mod] Sonicwave [ 26/Dec/14 ]

Confirmed for 1.8.2-pre1. This makes number key switching useless in Creative mode as they only create hassle instead of helping the player.

Comment by [Mod] Sonicwave [ 07/Nov/14 ]

Confirmed in 1.8.1-pre4.

Comment by [Mod] redstonehelper [ 14/Sep/14 ]

Confirmed for 1.8, different steps to reproduce:

1. Create new creative world
2. Put a sword in your first hotbar slot
3. While hovering over it, hit the 2 key
4. Close your inventory
5. Hit the "2" key
6. Hit a block - it will be destroyed, which swords are not supposed to do in creative mode

Comment by Bob Joe [ 23/Jun/14 ]

Confirmed for 14w25b

Comment by Itouch2 [ 07/May/14 ]

Confirmed for 14w18b.

Comment by Dakotah Intriglia [ 18/Mar/14 ]

This is confirmed for the latest snapshot. Please look into it. The way that I reproduce it is by opening up your inventory, hovering over slot 2-9, and pushing one to move it to slot one. When you place that block, it goes back to the block that was there before.

Comment by Christie N [ 22/Feb/14 ]

This also happens when dropping items from the creative inventory survival tab. Items disappear when dropped from other tabs.

Comment by NekoJonez [ 07/Dec/13 ]

To the comment above. I have to correct you a little bit on something. If you follow the instructions and DRAG the items, it doesn't work.

Also, when you right click with the sword, it changes into a bucket.

I do confirm that this bug works. And the sword stays a sword, even when you scroll away.

I think the issue is that the game thinks it's a bucket while a sword is displayed.

Comment by Aerotactics [ 07/Dec/13 ]

Reproduced in 1.7.3!

-In creative, start with an empty inventory, and put a sword as the first item in your hotbar.
-Place a water bucket as the second item. Switch to your sword outside of the inventory.
-Try breaking blocks with the sword (you can't), but you can with the bucket.
-Back in your inventory, hover your mouse over the sword and press 2. Exit your inventory.
-Both will be able to break blocks, but one won't produce sound.

NOTES:The other way around doesn't work (hovering over item 2 and pressing "1"), the bug doesn't work in survival; however, if you do this bug in creative, then switch to survival, if you try picking up the sword in your inventory, it will turn into a bucket of water, and the other bucket of water stays as a bucket of water (you lose the sword). At one point during testing, I ran into another bug, where some blocks were "unloaded", or invisible, and didn't appear until after relog; the only way I could tell they were there was that water wasn't getting to them. Done on Windows 8 (if that makes a difference).

WOW this bug is THAT old? Who knew?

Comment by SilentJelly [ 22/Aug/13 ]

Extremely strange behavior when I was testing swapping different tools (e.g. bows, swords, empty buckets) but the results weren't consistent.
Swords seem to be the most buggy especially when swapped with a bow.

Comment by redstonefreak589 [ 31/Jul/13 ]

Can confirm. Video link: http://www.youtube.com/watch?v=NaivsG1DZpU

Comment by Ben W [ 10/Apr/13 ]

My theory is that it's caused by whatever code makes items not disappear (i.e. be "copied" instead of "moved") when picked up from the upper part of the creative inventory. For some reason, this code is applying to the hotbar slots on these screens too, but only when number keys are used.

Normally, when you are in one of the category tabs in the creative inventory, pressing a number key on a slot in the upper, scrollable part copies a full stack of whatever was selected into the corresponding hotbar slot.

For some reason, when a number key is used on a hotbar slot, the same code is running, causing the item to be duplicated into the specified slot; however, unlike the above behavior, this copies the quantity of the item too, instead of giving a full stack. The client switches the items on the screen, but on the server side what actually took place was a duplication; this doesn't become visible to the player until the client recieves an inventory update.

As for why slots 3 and 7 are unaffected, I have no clue.

Comment by Ben W [ 10/Apr/13 ]

Found a reliable way to reproduce in 1.5.1 creative singleplayer.

If you are viewing the survival inventory in creative mode (the bottom-right tab, with the chest icon), using number keys in the hotbar works as expected.

In any other tab of the creative inventory, switching items in the hotbar with number keys causes the following behavior: After exiting the creative inventory, selecting the hotbar slot corresponding to the pressed number key and attempting to use that item (by right-clicking) causes whatever item is in that slot to be replaced with what was in there previously (i.e. before switching). The contents of the slots do not matter (edit: see below), for example if "2" is pressed over an empty hotbar slot, right-clicking with slot 2 selected will effectively "delete" the contents.
Edit: Further testing has shown that hotbar slots 3 and 7 (i.e. pressing the number keys "3" and "7") seem to be unaffected by this bug for whatever reason.
Edit: If a number key is pressed corresponding to a slot, and the item in that slot is a potion or splash potion, the behavior becomes unpredictable, appearing to depend on many different factors: The item is duplicated as described above, but the behavior on right-clicking varies in complicated ways. Items other than (splash) potions in the affected slot seem to follow the rules above.

After switching hotbar items in this manner (using number keys, on any tab other than survival inventory), the following actions will cancel the effect and revert to normal behavior:
-Exiting and re-opening the inventory.
-Further manipulation of items in the inventory, by any means, including mouse action or number keys; however the latter may trigger the bug anew in addition to canceling the previous effect, if not done on the survival inventory tab.

Pressing the same number key on the same slot twice (or any even number of times) will behave as expected, doing nothing to the items.

Example:
In the creative mode inventory, place a lever in hotbar slot 1, and redstone in hotbar slot 2. Open the creative mode inventory and go to the "Building Blocks" tab (top left, with bricks icon; any tab other than the survival inventory will work.) Put the cursor on the redstone and press "1". Visually, the items will appear to have been switched; there will now appear to be a lever in slot 2 and redstone in slot 1. Exit the inventory screen.

Trying to place a lever (now in slot 2) works as expected.
Trying to place redstone (in slot 1) causes a lever to appear in the hotbar in place of the redstone (effectively duplicating the lever), and for all intents and purposes the game acts as if you had a lever in that slot.
Attempting to drop the redstone (by default with Q) drops a lever instead.

Comment by FireHunterX [ 22/Nov/12 ]

When I do it it replaces the current inventory slot with the other one I switched.
EDIT- Doesn't require to to place the block, just right-click (or whatever button you may have it set to.)
EDIT again-I was able to successfully do this in survival, duplicating Emeralds. It took a while, so it may be a phantom glitch.

Comment by Kumasasa [ 14/Nov/12 ]

Confirmed also for 1.4.4

Comment by [Mod] CubeTheThird [ 13/Nov/12 ]

Can confirm.

Generated at Sun Jan 12 11:59:28 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.