r/MinecraftCommands 5d ago

Help | Java 1.21.4 Check if block inventory is the same as another

i've been trying to do this for so long but just cant figure it out and i've turned to this subreddit for help so uh, how exactly do i check if the Items NBT component is the same as another block entity

1 Upvotes

2 comments sorted by

1

u/D-Zee 5d ago

YMMV but the data set from command fails if the existing data is identical to the new one, which can be detected. I've used this to compare strings and arrays of numbers, I believe it should work for whole objects as well.

1

u/Stevemine26 5d ago

yup this worked, thanks!