Minecraft 1.13 Filled Map Glitch

minecraft-commandsminecraft-java-edition

I'm working on an adventure map and discovered this bug that produces ghost filled maps. What I did was:

  1. Have a Repeat Command Block set to "Always Active" and run /clear @a filled_map

  2. Hold 2 or more blank maps

  3. Right click 1 blank map and a ghost filled map pops up.

Ghost Filled Map

As you can see, Minecraft thinks that I only have blank maps and not the ghost filled map. The ghost filled map disappears whenever I re-log, but I can't ask the players who play my map to re log every single time they run into this glitch. So I was wondering if there are any methods that I could work my way around this problem?

Best Answer

So I was testing this and accidentally picked up a stone button, which then took the place of the ghost map. You can give the player with the ghost map a specially named/enchanted item (so it cannot be acquired in any other way) and then clear it from their inventory, which will also clear the ghost map from their inventory. If you used a datapack you could set up a tick function which clears the map and has a scoreboard to store the success of the clearing map command, and if that scoreboard shows that a map was cleared you give and clear the special item and then reset the scoreboard.