#These commands dont work in my datapack for some reason?

1 messages · Page 1 of 1 (latest)

timber basin
#

These command work when i put it in a command block but when i put it in my tick.mcfunction file it dont:

execute as @a at @s if block ~ ~-1 ~ stone unless entity @s[nbt={Inventory:[{Slot:100b,id:"minecraft:netherite_boots",Count:1b}]}] run effect give @s wither 1 2 true
execute as @a at @s if block ~ ~-1 ~ stone unless entity @s[nbt={Inventory:[{Slot:100b,id:"minecraft:netherite_boots",Count:1b}]}] run effect give @s wither 1 2 true
execute as @a at @s if block ~ ~-1 ~ stone unless entity @s[nbt={Inventory:[{Slot:100b,id:"minecraft:netherite_boots",Count:1b}]}] run effect give @s wither 1 2 true
execute as @a at @s if block ~ ~-1 ~ stone unless entity @s[nbt={Inventory:[{Slot:100b,id:"minecraft:netherite_boots",Count:1b}]}] run effect give @s wither 1 2 true
execute as @a at @s if block ~ ~-1 ~ stone unless entity @s[nbt={Inventory:[{Slot:100b,id:"minecraft:netherite_boots",Count:1b}]}] run effect give @s wither 1 2 true
execute as @a at @s if block ~ ~-1 ~ stone unless entity @s[nbt={Inventory:[{Slot:100b,id:"minecraft:netherite_boots",Count:1b}]}] run effect give @s wither 1 2 true

#

everything else in a tick.mcfunction file works tho

hexed flare
#

execute as @a[nbt=!{Inventory:[{Slot:100b,id:"minecraft:netherite_boots",Count:1b}]}] at @s if block ~ ~-1 ~ minecraft:stone run effect give @s wither 1 2 true

Also, why is that the same command multiple times?

timber basin
#

nah its not the type of boots is differeant

#

wait what

#

oh shi

#

i sent the wrong one soz

#

execute as @a at @s if block ~ ~-1 ~ stone unless entity @s[nbt={Inventory:[{Slot:100b,id:"minecraft:leather_boots",Count:1b}]}] run effect give @s wither 1 2 true
execute as @a at @s if block ~ ~-1 ~ stone unless entity @s[nbt={Inventory:[{Slot:100b,id:"minecraft:chainmail_boots",Count:1b}]}] run effect give @s wither 1 2 true
execute as @a at @s if block ~ ~-1 ~ stone unless entity @s[nbt={Inventory:[{Slot:100b,id:"minecraft:iron_boots",Count:1b}]}] run effect give @s wither 1 2 true
execute as @a at @s if block ~ ~-1 ~ stone unless entity @s[nbt={Inventory:[{Slot:100b,id:"minecraft:golden_boots",Count:1b}]}] run effect give @s wither 1 2 true
execute as @a at @s if block ~ ~-1 ~ stone unless entity @s[nbt={Inventory:[{Slot:100b,id:"minecraft:diamond_boots",Count:1b}]}] run effect give @s wither 1 2 true
execute as @a at @s if block ~ ~-1 ~ stone unless entity @s[nbt={Inventory:[{Slot:100b,id:"minecraft:netherite_boots",Count:1b}]}] run effect give @s wither 1 2 true

timber basin
#

if i were too put it in a cmd block it would work but it dont work in my tick.mcfunction file

solid fulcrum
#

is the file executing? so do other commands execute? I'd try putting a say command near where those commands are

timber basin
#

nah the problem is something to do with the [{Slot:100b,id:"minecraft:netherite_boots",Count:1b}]}] part i think because whenever i step on stone i still take dmg but the problem is is that when i wear boots i still take dmg

lucid ivy
#

are you sure boots are slot 100b?

timber basin
#

i saw it on youtube

solid fulcrum
#

i recommend a predicate, it would be one predicate instead of 6 and it just has a field "feet" for your equipment

timber basin
#

yuh

#

thats 100

#

oh yeahhhhhhh

#

alr ima try predicate

#

icl it did not work?

#

execute as @a unless predicate difficulty:leatherboots at @s if block ~ ~-1 ~ minecraft:stone run effect give @s wither 1 2 true

#

leatherboots.json

{
    "condition": "minecraft:entity_properties",
    "entity": "this",
    "predicate": {
      "type": "minecraft:player",
      "equipment": {
        "feet": {
          "items": [
            "minecraft:leather_boots"
          ],
          "count": 1
        }
      }
    }
  }
solid fulcrum
#

i'd leave out the count but this should work

#

what if you run execute if predicate <this:predicate>?

#

just in chat?

timber basin
#

it works

#

but not in datapack

solid fulcrum
#

wait, so if you don't have leather boots on you get wither

#

and if you don't have lets say iron boots on you get wither

#

you can't wear both at the same time

#

i think the logic is flawed

#

i think you should just check if your feet slot is minecraft:air

#

then you can be sure that they don't have boots on