As we already know, we can set items in the 'player.cursor' slot with the command :
item fill entity @s player.cursor with dirtOpen your inventory and you’ll have a dirt block on your cursor. But it’s impossible for us to test for any item in this slot…
If we try to set any other slot from this one, nothing happens : (put in a repeating command block)
execute as @p run item replace entity @s armor.head from entity @s player.cursorAnd even predicates aren’t able to test for items here : (example for a slot_source)
{
"type": "minecraft:filtered",
"item_filter": {
"items": "minecraft:knowledge_book",
"count": 1
},
"slot_source": [
{
"type": "minecraft:slot_range",
"source": "this",
"slots": "hotbar.*"
},
{
"type": "minecraft:slot_range",
"source": "this",
"slots": "armor.*"
},
{
"type": "minecraft:slot_range",
"source": "this",
"slots": "inventory.*"
},
{
"type": "minecraft:slot_range",
"source": "this",
"slots": "weapon.offhand"
},
{
"type": "minecraft:slot_range",
"source": "this",
"slots": "player.cursor"
}
]
}Using this slot source, if we try to replace any knowledge book in the player's whole inventory, the book will be replaced in every slot it occupies, except for the 'player.cursor'.
To test this, place the following command in an Impulse Command Block with a pressure plate on top. Then, fall from a great height onto the pressure plate to give yourself time to open your inventory and pick up the item with your cursor.
execute as @p run item fill entity @s example:knowledge_book_in_player_inventory with dirtTo give yourself a knowledge book, run this command in the chat:
give @s minecraft:knowledge_bookYou can test this command and slot_source by installing the provided datapack.
Linked issues
Attachments
Comments 5
We do not have enough information to find the cause of this issue.
Please record a video of this happening and attach it to this report.
If you are on Windows, you can use Windows+Alt+R to open a built-in app for recording game footage.
If you are on Mac (Mojave or later), you can use Shift+Command+5 to open a built-in app for recording your screen.
In case you don't have a program to record videos, we recommend using the free recording software OBS.
In case the resulting video file is too large to be uploaded to the bug tracker directly, please upload it elsewhere (e.g. as an unlisted video on YouTube) and link to it here.
This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Just saw an other report and after investigation, the problem is the creative mode!
When in survival, everything seems to work fine.
I was about to mention an inconsistency in a new report, but this one talks about it instead.
Issue; when picking up an item with our cursor, Minecraft can’t “see” it, but if we place it in our cursor via a command then it works..??
Thank you for your report!
However, this issue is Working as Intended.
The report you have submitted is working as intended: refer to the 24w10a changelog, which is quoted below:
Slot names
[…]
player.cursor- item held by player on screen
Note: this information is not available in creative mode
Please note that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.
Full Version History – Snapshot Version History – The official Minecraft feedback site
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Thank you for helping us improve Minecraft! We saved your files: