1

1.20.4 targeting item nbt's

WonderBoots's Avatar WonderBoots12/8/23 7:21 am
1 emeralds 300 6
12/8/2023 9:48 am
MinecraftWubbox's Avatar MinecraftWubbox
execute at @e[type=item,nbt={Item:{id:"minecraft:warped_stem"}}]


this does not seem to work in 1.20.4 i dont know if its a bug or a change in code but you cannot target item entites to see there specific nbt value to detect which item they are so this is very weird for me never had issues before 1.20.4 anyone else having issues?
Posted by WonderBoots's Avatar
WonderBoots
Level 71 : Legendary Engineer
278

Create an account or sign in to comment.

6

1
12/08/2023 9:48 am
Level 13 : Journeyman Unicorn
MinecraftWubbox
MinecraftWubbox's Avatar
Hello.
1
12/08/2023 9:46 am
Level 61 : High Grandmaster Sweetheart
imalittlhigh
imalittlhigh's Avatar
strange, you just gave me a heart attack ;D
But after testing, it works for me (tested with oak log)
tho you could also just use predicates instead of checking the nbt directly, might have less issues.
1
12/08/2023 7:41 am
Level 29 : Expert Nerd
Sul4ur
Sul4ur's Avatar
you can use the following command to view the nbt of the item entity and find the issue:
/data get entity @e[type=item,sort=nearest,limit=1]* You will need to get close to the item
1
12/08/2023 7:56 am
Level 71 : Legendary Engineer
WonderBoots
WonderBoots's Avatar
that would work, i need to detect a log type when a tree is chopped trying to update to 1.20.4 but current method does not work, 1.20.4 does not like

execute at @a if score @p crouch matches 1.. run tag @e[type=item,nbt={Item:{id:"minecraft:birch_log"}},tag=!Done] add Mined
then once its done the check it will add "Done" to the item entitie so there is no infinite loop.
this worked perfectly in 1.20.2 however 1.20.4 this seems to be posing an issue and yet to figure out why and what changed.
1
12/08/2023 7:44 am
Level 71 : Legendary Engineer
WonderBoots
WonderBoots's Avatar
yh i figured out the culprit. 1.20.4 datapcks kinda dont work??



i made a blank pack with just a load and tick mcfunction and with a simple /tellraw command and it doesnt work at all
1
12/08/2023 7:45 am
Level 71 : Legendary Engineer
WonderBoots
WonderBoots's Avatar
okay so i got it working but i dont know 1.20.4 is giving me issues
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome