Setting an item to air using /data logs an error
Steps to reproduce:
- Launch the game with output enabled and create/open a world
- Place a chest down and stand on it
- Run
/data merge block ~ ~ ~ {Items:[{Slot:0b,id:"minecraft:air",Count:1b}]} - Switch to the Minecraft game output window
Observed result:
A Tried to load invalid item: 'Item must not be minecraft:air' error is generated.
Expected result:
No error is generated.
Created Issue:
Minecraft game output - error
"Tried to load invalid item: 'Item must not be minecraft:air'"
Can confirm this happening while playing on both Multiplayer Singleplayer also when have Save and Quit to Tittle. its spams beyond 100,000 and continues further until Minecraft game output crash/exit. this bug has been going on for long while. cant confirm starting version, 1.20.5/1.20.6 - 1.21.
Environment
Windows 10 Home, Java 8 Update 411 (64-bit).
"Tried to load invalid item: 'Item must not be minecraft:air'"
Can confirm this happening while playing on both Multiplayer Singleplayer also when have Save and Quit to Tittle. its spams beyond 100,000 and continues further until Minecraft game output crash/exit. this bug has been going on for long while. cant confirm starting version, 1.20.5/1.20.6 - 1.21.
[Briefly describe the bug here]
"Tried to load invalid item: 'Item must not be minecraft:air'"Can confirm this happening while playing on both Multiplayer Singleplayer also when have Save and Quit to Tittle. its spams beyond 100,000 and continues further until Minecraft game output crash/exit. this bug has been going on for long while. cant confirm starting version, 1.20.5/1.20.6 - 1.21.
Steps to Reproduce:
[Step 1]open the Minecraft Launcher with "Open output log when Minecraft: Java Edition starts" enabled than click play Lastest release.
[Step 2]click Singelplayer and load the world "tnt cannon".
[Step 3]switch to window "Minecraft game output - error" than go to levels "error".Observed Results:
[Describe what happens]the error builds up and extends beyond 100,000 lines fast and after while the window will have no text than it exit after while later
Expected Results:
[Describe what should happen]don't think window "Minecraft game output - error" should be this crazy after played in the world it keeps going while am on main menu or server.
Screenshots/Videos:
[Optional: Attach an image or short video]screenshot are already added
Notes:
[Any further information you can provide about the bug, such as explaining any attachments you’re including, when the bug started to occur, how you’ve tested the bug,
messages displayed (e.g., error messages), and how the bug impacts gameplay.]if anything just ask cant came up with anything at least not much more than already given.
[Briefly describe the bug here]
"Tried to load invalid item: 'Item must not be minecraft:air'"Can confirm this happening while playing on both Multiplayer Singleplayer also when have Save and Quit to Tittle. its spams beyond 100,000 and continues further until Minecraft game output crash/exit. this bug has been going on for long while. cant confirm starting version, 1.20.5/1.20.6 - 1.21.
Steps to Reproduce:
[Step 1]open the Minecraft Launcher with "Open output log when Minecraft: Java Edition starts" enabled than click play Lastest release.[Step 2]click Singelplayer and load the world "tnt cannon".[Step 3]switch to window "Minecraft game output - error" than go to levels "error".Observed Results:
[Describe what happens]the error builds up and extends beyond 100,000 lines fast and after while the window will have no text than it exit after while later
Expected Results:
[Describe what should happen]don't think window "Minecraft game output - error" should be this crazy after played in the world it keeps going while am on main menu or server.
Screenshots/Videos:
[Optional: Attach an image or short video]screenshot are already added
Notes:
[Any further information you can provide about the bug, such as explaining any attachments you’re including, when the bug started to occur, how you’ve tested the bug,
messages displayed (e.g., error messages), and how the bug impacts gameplay.]if anything just ask cant came up with anything at least not much more than already given.Summary
"Tried to load invalid item: 'Item must not be minecraft:air'"Can confirm this happening while playing on both Multiplayer Singleplayer also when have Save and Quit to Tittle. its spams beyond 100,000 and continues further until Minecraft game output crash/exit. this bug has been going on for long while. cant confirm starting version, 1.20.5/1.20.6 - 1.21.
Steps to Reproduce:
1. open the Minecraft Launcher with "Open output log when Minecraft: Java Edition starts" enabled than click play Lastest release.
2. click Singelplayer and load the world "tnt cannon".
3. switch to window "Minecraft game output - error" than go to levels "error".Observed Results:
the error builds up and extends beyond 100,000 lines fast and after while the window will have no text than it exit after while later
Expected Results:
don't think window "Minecraft game output - error" should be this crazy after played in the world it keeps going while am on main menu or server.
Screenshots/Videos:
screenshot are already added
Notes:
if anything just ask cant came up with anything at least not much more than already given.
Windows 10 Home, Java 8 Update 411 (64-bit).
Minecraft game output - errorTried to load invalid item: 'Item must not be minecraft:air' error when loading certain world
Tried to load invalid item: 'Item must not be minecraft:air' error when loading certain worldSetting an item to air using /data logs an error
Summary
"Tried to load invalid item: 'Item must not be minecraft:air'"Can confirm this happening while playing on both Multiplayer Singleplayer also when have Save and Quit to Tittle. its spams beyond 100,000 and continues further until Minecraft game output crash/exit. this bug has been going on for long while. cant confirm starting version, 1.20.5/1.20.6 - 1.21.
Steps to
Reproduce:1. open the Minecraft Launcher with "Open output log when Minecraft: Java Edition starts" enabled than click play Lastest release.
2. click Singelplayer and load the world "tnt cannon".
3. switch to window "Minecraft game output - error" than go to levels "error".Observed Results:
the error builds up and extends beyond 100,000 lines fast and after while the window will have no text than it exit after while later
Expected Results:
don't think window "Minecraft game output - error" should be this crazy after played in the world it keeps going while am on main menu or server.
Screenshots/Videos:screenshot are already added
Notes:
if anything just ask cant came up with anything at least not much more than already given.
Steps to reproduce:
- Launch the game with output enabled and create/open a world
- Place a chest down and stand on it
- Run
/data merge block ~ ~ ~ {Items:[{Slot:0b,id:"minecraft:air",Count:1b}]}- Switch to the Minecraft game output window
Observed result:
An error is generated
Steps to reproduce:
- Launch the game with output enabled and create/open a world
- Place a chest down and stand on it
- Run
/data merge block ~ ~ ~ {Items:[{Slot:0b,id:"minecraft:air",Count:1b}]}- Switch to the Minecraft game output window
Observed result:
Anerror is generatedSteps to reproduce:
- Launch the game with output enabled and create/open a world
- Place a chest down and stand on it
- Run
/data merge block ~ ~ ~ {Items:[{Slot:0b,id:"minecraft:air",Count:1b}]}- Switch to the Minecraft game output window
Observed result:
A Tried to load invalid item: 'Item must not be minecraft:air' error is generated.Expected result:
No error is generated.
@blublu_owns123 {}



Please attach the full launcher log found in minecraft/launcher_log.txt.
We do not have enough information to find the cause of this issue.
Please attach the crash report found in minecraft/crash-reports/crash-<DATE>-client.txt here.
If you cannot find a crash report, please attach the full launcher log found in minecraft/launcher_log.txt.
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
File "launcher_log.txt" was not uploaded
File exceeds maximum size limit set by the administrator (10.00 MB).
could not attach the full launcher log found in minecraft/launcher_log.txt. so have uploaded it on one drive to have a link to share the file. launcher_log.txt
Could you please attach the world file found in minecraft/saves/<world name> ?
The log isn't particular useful, but the world file would be.
To circumvent the file size limit, if the file size is too large, please upload it somewhere else and then 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
File "2024-07-07_17-54-37_tnt cannon.zip" was not uploaded
File exceeds maximum size limit set by the administrator (10.00 MB).
could not attach the world file found in minecraft/saves/<world name> so have uploaded it backup of world on one drive to have a link to share the file. 2024-07-07_17-54-37_tnt cannon.zip
I don't get it. Please:
have updated the bug report.
Can confirm with the provided world. I wonder what could be causing this...
The problem seems to be tied to the always active repeating command blocks in your world; launching a server with your world with command blocks disabled does not give any errors, but launching it with command blocks enabled does give the Tried to load invalid item: 'Item must not be minecraft:air' errors.
to be honest no clue myself. data-packs does no effect after deleted. no mods installed. no resource pack just build-in but are disabled. don't like adding stuff to the game like the game best has it are no absolute no extra staff needed has see people having issue with it and must tinker with it to make it work plug-and-play its the best and not create bug report often here.
Yeah the command blocks under the bee farm (chunks 107, 42 and 107, 43) are trying to merge air into the dispensers above them. What's interesting is that those blocks seem to perform their intended function just fine- there's no error in the LastOutput field, only in the game console.
Edit: this can be easily reproduced by doing the following:
/data merge block ~ ~ ~ {Items:[{Slot:0b,id:"minecraft:air",Count:1b}]}Notice how an error was generated
[Mod] Jarl-Penguin where its this repeating command block? have some in the world to replace items for dispenser/hopper/composter. also have command blocks to tp glow squid and slime out of world glow squid mess around with structure spawn has long its blocks of water and dies and the slime makes bit of noise and they can spawn bit too much of them so iron golem dies easy.
[Helper] clam lol ye those blocks seem to perform their intended function just fine.
think one empty bottle should hold but not sure if had 9 empty bottle like one one each slot than its no air in the slots?
So all told this bug should be retitled Setting an item to air using /data logs an error (but works just fine) or something. (And yes I tested with /item too, no issues there.)
Mojang may decide to call this intended; after all, trying to set an item to minecraft:does_not_exist has the same effect. In my mind the unexpected part is that the command executes successfully: the old item is removed from the slot and no in-game error is thrown, and if you were trying to clear the slot anyway, you won't notice there's been a problem until you look at the game console.
[~clam lol] A new bug report could be better.
Lunarian there's only one issue here. Just because it wasn't fully pinned down at the time the report was made is no reason to make a new one.
seems have solved it it all was focused on dispenser inside bee farm i having a system that auto fills bottle but have just used one and had 8 more slots that was set to be air in command have not set it or don't using air to any slots but know its used to have empty slots it should been "" instead for "minecraft:air" surely am not alone with this problem with the little information to go on was a bit stock at figure it out one of reasons have the game output open.
Anyway blublu_owns123 just run /tick freeze to stop the errors temporarily and replace the commands in the offending blocks with
/data modify block ~ ~1 ~ Items set value [{Slot:4b,id:"minecraft:glass_bottle",Count:1b}]. Modify is better than merge if you want to completely replace an inventory. (Also you seem to have some impulse blocks below the repeating ones which replace the repeating ones, so update those too.)
have updated those blocks under it that place repeat command block to fill dispenser with 9 bottles instead for 1, its works fine now none error for over 30min+.
am use this to set repeat block
{Slot:0b,id:\"minecraft:glass_bottle\",Count:1b}/setblock ~ ~7 ~ repeating_command_block{Command:"/data merge block ~ ~1 ~ {Items:[
,{Slot:1b,id:\"minecraft:glass_bottle\",Count:1b},{Slot:2b,id:\"minecraft:glass_bottle\",Count:1b},{Slot:3b,id:\"minecraft:glass_bottle\",Count:1b},{Slot:4b,id:\"minecraft:glass_bottle\",Count:1b},{Slot:5b,id:\"minecraft:glass_bottle\",Count:1b},{Slot:6b,id:\"minecraft:glass_bottle\",Count:1b},{Slot:7b,id:\"minecraft:glass_bottle\",Count:1b},{Slot:8b,id:\"minecraft:glass_bottle\",Count:1b}]}",SuccessCount:0,TrackOutput:1b,powered:0b,auto:1b,conditionMet:1b,UpdateLastExecution:1b} destroy
with this command
{Slot:0b,id:"minecraft:glass_bottle",Count:1b}/data merge block ~ ~1 ~ {Items:[
,{Slot:1b,id:"minecraft:glass_bottle",Count:1b},{Slot:2b,id:"minecraft:glass_bottle",Count:1b},{Slot:3b,id:"minecraft:glass_bottle",Count:1b},{Slot:4b,id:"minecraft:glass_bottle",Count:1b},{Slot:5b,id:"minecraft:glass_bottle",Count:1b},{Slot:6b,id:"minecraft:glass_bottle",Count:1b},{Slot:7b,id:"minecraft:glass_bottle",Count:1b},{Slot:8b,id:"minecraft:glass_bottle",Count:1b}]}
that did was change minecraft:air to minecraft:glass_bottle did not think on you method might worked too.
hi [Helper] clam lol that command given turned red btw.
have added two \
/setblock ~ ~7 ~ repeating_command_block{Command:"/data modify block ~ ~1 ~ Items set value [{Slot:4b,id:{*}\{*}"minecraft:glass_bottle{*}\{*}",Count:1b}]",SuccessCount:0,TrackOutput:1b,powered:0b,auto:1b,conditionMet:1b,UpdateLastExecution:1b} destroy
now that works and yours
also that command works fine too like my its no error
just took away all unnecessary parts with air and made it fill one slot instead for all nine and with air.
Thank you for your report!
After consideration, the issue is being closed as Working as Intended.
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
hi [Helper] clam lol just wandering how you find that name thomas am bit confused have two user but can only use one
They misspelled your username when mentioning you. Pasting your full name into a mention leads to blublu_owns123 ([~blublu_owns123]).
wandering how to make that avatar-icon-user thing with green?