So, now execute if data only has one use: checking if NBT tag exists, and thats useful, but not that much.
Here is my idea of improving it:
You can check if NBT tag exists(or has a value) like previously:
/execute if data entity @s SelectedItem.id exists
But you can also compare the value(or lenght for lists) to something else:
Score:
/execute if data entity @s SelectedItem.Count matches score @s testscore
The above checks if the NBT tag 'SelectedItem.Count' of @s matches the score 'testscore' of @s
Entity(like data store entity):
/execute if data entity @s SelectedItem.id matches entity @p Inventory[10].id
The above checks if the NBT tag 'SelectedItem.id' of @s matches the NBT tag 'Inventory[10].id' of @p
Tag(can be ANY tag):
/execute if data entity @s SelectedItem.id matches tag #minecraft:fishes
The above checks if the NBT tag 'SelectedItem.id' of @s matches any of the id's specified in the tag '#minecraft:fishes'
This would greatly improve the execute if data command and would make the item tags not that useless anymore and strings in nbt could be compared better.
I got kind of inspíred by https://feedback.minecraft.net/hc/en-us/community/posts/360029482531--18W44A-Executing-if-unless-Match-Data?input_string=Improve%20execute%20if
But i wanted to add things
5 Comments
Please sign in to leave a comment.
Post a new comment: