EDIT:
Still an issue as of 2/7/18
EDIT:
Still an issue as of 3/2/18
EDIT:
Still an issue as of 3/9/19 (1.2.11)
I've recently been working on creating a command block based map that uses a trading system. After creating a command block system that would function as a trading center, I tested the system to find that 2/3 command blocks work as normal.
The first command block is an Impulse Non-Conditional that is powered by a button, which would clear a certain amount of a specific item from the nearest player's inventory, which then leads onto the next two blocks.
The second command block is the one that is broken. It is a Chain Conditional command block, which activates once the CB behind triggers, and is supposed to give the nearest player a certain amount of a specific item. Now, the problem isn't the function, it's the execution. I would press the button, and then the first CB would work as expected, and then the third block, which also a Chain Conditional that sends a title command to the action bar indicating a successful trade, would send out its message, but no items are given to my inventory; that is until I press the button again, to which then it takes more of the trade item out of my inventory, and then gives me the item, but only the yeild from the first activation appears until I click on the icon and the correct amount appears.
For Example:
32 Rotten Flesh for 2 Golden Apples
1.) Presses Button, 32 Rotten Flesh are taken from my inventory
2.) Actionbar message "You have successfully traded." appears, but the Golden Apples are not in my inventory.
3.) I press the button again, which takes 32 Rotten Flesh from my Inventory
4.) I receive the original 2 apples.
5.) I open my inventory and click on the 2 apples, and then it updates and the correct amount of four are now given.
6.) Actionbar message does not appear.
This pattern repeats forever.
I can confirm that this isn't of my own error, as I have footage of this command block system working as intended from the person I got the design from (see video here:https://www.youtube.com/watch?v=rNcVBbyjkpc)
At some point between that video and the present, this bug came to be, I don't know when, and I don't know why.
This bug is important and ruins intended game function, and thus should not be passed over.
I have been treated horribly before by the Bug Tracker people, as they have simply brushed me to the side and never addressed me again after hearing my initial case. So please, hear what I have to say before discarding my post, this issue, and me.
Linked issues
is duplicated by 3
Comments 5
Same here:
when using /clear and /give in the same tick, example, you have a /clear command block, and a /give command block, the inventory is confused, and ghost items are created. another item has to be moved into the slot that the item is in, so that the item will reveal itself.
steps to reproduce:
make sure that inventory is empty exept for dirt.
impulse command block: /clear @p dirt
chain command block: /give cobblestone
ghost cobblestone should now be in the first inventory slot.
attempt to place another object in the first inventory slot to reveal.
Note: an automated temporary solution is to use a repeater to delay a tick, and give the player an item, and then ue another repeater, and then remove the item.
example:
repeater
Commandblock ( /give dirt 1 )
repeater
Commandblock ( /clear dirt 1 )
This bug has been reported to our internal bug tracker for further testing and a fix. It is scheduled to be fixed in one of the future updates (no specific date can be provided).
Same issues here, from my report:
When clearing a players inventory of a certain item then giving another item, the first item does not show up until you force a manual update of the slot by trying to place something in the "empty" slot that actually has an item, but only if they didn't have the item to begin with. Slot count will remain 1 behind if you don't force an update.
Steps to reproduce:
1. Run "clear" command on yourself to make sure inventory state reset
2. Give yourself a stack of gold_nugget items
3. Place down a command block in impulse/need redstone mode, give it the command: "clear @p gold_nugget -1 2"
4. Place down a command block with the first one pointing to it, put it in chain/conditional/always active mode, give it the command: "give @p spawn_egg 1 17"
5. Put a button on the impulse command block, press it.
Wether you are in creative or adventure mode, it should have taken 2 gold nuggets off you and given you a ghosted invisible spawn egg in the next logical inventory spot.
You can confirm this by splitting the gold nugget stack and trying to place it where you would have expected the spawn egg to be, the game will then realize the issue and cancel the placement and actually show the spawn egg.
Alternatively, you could just press the button a second time, and you will see you finally have 1 spawn egg, but its actually 2, select the spawn egg, press q to toss them, it'll cancel that action and show 2 spawn eggs now.
After forcing a manual update, the problem appears to go away until you no longer have any of that item or have cleared your inventory.
This is the only scenario I have found this issue, but also the only easy way I can trade 1 item for another as a form of currency so its a fairly major bug for what I need.
Edit: appears to be mostly related to chain command blocks and use of clear command or maybe just multiple inventory based commands, if you replace the command from step 4 with "/enchant @p sharpness 3" and have a sword, the same type of issue happens, your sword doesnt appear enchanted until you try to move it in your inventory.
Edit 2: the result message is also very weird for this type of clear command, despite filtering it for just a specific item for a specific count it will say stuff like "Cleared the inventory of NAME, removing 12 items", 12 items being the total count of everything I have, the code logic of the clear command probably needs a good cleanup.