Invisible items with give commands in some cases using functions
With the function below, dropping the last tnt gives a new one, but placing it gives an invisble one instead (right click with the slot it would be in places is too, picking another one up from the floor reveals the second one, etc.)
Running in minecraft:tick:
execute as @a[team=blue,nbt=!{Inventory:[{id:"minecraft:tnt"}]}] if score Aqua tnt matches 1.. if score match match matches 2 run function tntbattle:tnt-blue
The referred tntbattle:tnt-blue function:
give @s minecraft:tnt scoreboard players remove Aqua tnt 1
Created Issue:
Invisible items with give commands in some cases using functions
With the function below, dropping the last tnt gives a new one, but placing it gives an invisble one instead (right click with the slot it would be in places is too, picking another one up from the floor reveals the second one, etc.)
Running in minecraft:tick:
execute as @a[team=blue,nbt=!{Inventory:[{id:"minecraft:tnt"}]}] if score Aqua tnt matches 1.. if score match match matches 2 run function tntbattle:tnt-blueThe referred tntbattle:tnt-blue function:
give @s minecraft:tnt scoreboard players remove Aqua tnt 1
Added Linked Issues:
duplicates
This was seemingly fixed earlier this year:
MC-29318.Thank you for your report!
We're tracking this issue in
MC-29318, so this ticket is being resolved and linked as a duplicate.That ticket has already been resolved as Fixed. Please check the Fix Version/s field in that ticket to see in which version this behavior was or will be fixed.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
– I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.