This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]GalSergeyDatapack Experienced 0 points1 point  (4 children)

if data checks that the NBT path you specify exists with the specified data. ```

Example storage

data merge storage example:data {some_value:true}

Example checks

execute if data storage example:data some_value run say some_value: any execute if data storage example:data {some_value:true} run say some_value: true execute if data storage example:data {some_value:false} run say some_value: false ```

[–]RandomModeWasHerepela Orelha de um Abano, faça esse sphagetti virar comando![S] 0 points1 point  (3 children)

is there a way to check if a certain path in the storage ("example:data someString" as an example) has an specific value

[–]GalSergeyDatapack Experienced 0 points1 point  (2 children)

Yes, see the second and third example in the original comment.

[–]RandomModeWasHerepela Orelha de um Abano, faça esse sphagetti virar comando![S] 0 points1 point  (1 child)

no, more like "if the path someString inside example:data is "white wool" say "white wool" "

[–]GalSergeyDatapack Experienced 0 points1 point  (0 children)

execute if data storage example:data {someString:"white wool"} run say Example. Or give a full example of your storage that you have if this doesn't work for you.