mojira.dev
MC-42636

Obscure bug causes items to vanish completely from the hotbar

Updated description

So I've been trying to simply the requirements for reproducing the bug. It turns out it's not so obscure after all and indeed has nothing to do with my contraption/world.

Steps to reproduce:

  1. Be in creative mode and put a stack of 1-64 of any item in your hotbar (any slot).

  2. Do both of these steps in any order:

    • Switch to a different hotbar slot except 3 or 7. (It must be the same slot as below).

    • Open your inventory screen ("E") and, using the number keys, move the item(s) to a different hotbar slot except 3 or 7. (It must be the same slot as above). Then close the inventory screen.

  3. Do one of the following:

    • Interact with any block (e.g. button, lever, door, note block, brewing stand, comparator, etc). The item(s) will immediately vanish.

    • Try to place the item if it's a block (the block will briefly appear in the world and then be removed along with the item(s) in your hotbar).

    • Try to drink/throw the item if it's a potion or bucket of milk (you will not get the effect/no potions will be thrown and buckets of milk will not remove potion effects).

    • If the item is a bow and you try to shoot an arrow with it, you may be able to draw but no arrow will be shot. Sometimes the bow just vanishes immediately.

    • If the item(s) is a spawn egg or minecart, you will not be able to spawn a mob or place a minecart.

In summary, it's as if the item(s) in your hotbar didn't even exist.

For some odd reasion, the bug doesn't seem happen with the 3rd and 7th hotbar slots.

I've attached another GIF animation demonstrating the simplified process.


Original description

This is some voodoo sh*t (pardon my French). I've been working on a contraption that's supposed to imitate the way an airlock works (draining & flooding a small chamber with water). Everything works great but I noticed a veeerry strange glitch that, while rather harmless at the moment, might cause problems in the future.

The best way to explain it is by showing you, so I've attached a GIF animation demonstrating the process.

The gist of it: I plop an item into the mechanism, it does its thing, meanwhile I switch to another hotbar slot (only tested slot #2 so far - I'll test more extensively later). Eventually I get the item back from a dropper and I step out of the contraption. Then I open the inventory and put the item into slot #2 since it automatically went into the (empty) slot #1 when it was returned. So now I'm holding the item in slot #2. Now I can wait as long as I want but the moment I press a button the item vanishes from the game. (any button, and probably any redstone device, although I haven't tested extensively yet - I thought it'd be better to draw attention to this bug as early as possible and progressively work on reducing it to its essential components since it might take me a long time with a contraption this big)

In case you're wondering: I'm not using ANY command blocks or exploiting any glitches here. Just straight-up survival-friendly design!

Of course, I attached the world save to this ticket so anyone can test it and see if they can reproduce it. Just follow the process shown in the GIF (for now and as I begin to pin-point the bug I'll upload simpler and simpler versions) and remember that this does only happen in creative mode and not in survival mode (as far as I can tell).

I did some searching for similar tickets and found MC-341 and MC-2912, however, I don't think they are necessarily the same bug since MC-341 involves spamming keys and both MC-341 and MC-2912 involve swapping items in the hotbar without any prior setup as in this case and I've never noticed any problems swapping items outside of this particular occasion.

Related issues

Attachments

Comments

migrated
[media][media][media][media]
migrated

I might be barking up the wrong tree here but it's the only "vanishing item" scenario I know. Was the item created with a command block? I had troubles with ghost items in chests created by command blocks until I realized that you need to include the count (number of items). A ghost item in that scenario is actually a "stack of 0" of the item and vanishes the moment you use it or press any buttons with it in your hand. I think the give command has an error message if you don't include the count so it doesn't happen that way.
Basically check if the item disappears no matter what (even without going through the machine). If it doesn't and your machine doesn't use command blocks at any point then it's probably not the problem I'm thinking of.

kumasasa

Please zip or 7Z your world and attach it here, or upload to a 3rd party file hoster and provide the link if the archive is > 10 MB

migrated

Here is my zipped world:

[media]
migrated

So I've been trying to simply the requirements for reproducing the bug. It turns out it's not so obscure after all and indeed has nothing to do with my contraption/world.

Steps to reproduce:

  1. Be in creative mode and put a stack of 1-64 of any item in your hotbar (any slot).

  2. Do both of these steps in any order:

    • Switch to a different hotbar slot except 3 or 7. (It must be the same slot as below).

    • Open your inventory screen ("E") and, using the number keys, move the item(s) to a different hotbar slot except 3 or 7. (It must be the same slot as above). Then close the inventory screen.

  3. Do one of the following:

    • Interact with any block (e.g. button, lever, door, note block, brewing stand, comparator, etc). The item(s) will immediately vanish.

    • Try to place the item if it's a block (the block will briefly appear in the world and then be removed along with the item(s) in your hotbar).

    • Try to drink/throw the item if it's a potion or bucket of milk (you will not get the effect/no potions will be thrown and buckets of milk will not remove potion effects).

    • If the item is a bow and you try to shoot an arrow with it, you may be able to draw but no arrow will be shot. Sometimes the bow just vanishes immediately.

    • If the item(s) is a spawn egg or minecart, you will not be able to spawn a mob or place a minecart.

In summary, it's as if the item(s) in your hotbar didn't even exist.

For some odd reasion, the bug doesn't seem happen with the 3rd and 7th hotbar slots.

I've attached another GIF animation demonstrating the simplified process.

kumasasa

Confirmed in the attached world.

migrated

(Unassigned)

Confirmed

Minecraft 1.7.4

Retrieved