#1.21.20

1 messages · Page 1 of 1 (latest)

turbid rover
#

The command execute @e[hasitem={location=slot.weapon.offhand,item=mt:torchspeed}] ~ ~ ~ execute @s ~ ~ ~ /effect @s speed 1 1 true Not working anymore in update?

amber bay
#

I guess old execute finally doesn't work anymore

#

Or you touched your command block

shell zodiac
#

That syntax stopped working since 1.19.80.

It only works in command blocks created/edited before that update.

... And also that code is super redundant and inefficient anyways. Why are you executing them to give themselves the effect when you can just directly give them the effect?

#

effect @e[hasitem={location=slot.weapon.mainhand,item=mt:torchspeed}] speed 1 1 true

#

@turbid rover

turbid rover
#

It was a function not a command block

shell zodiac
#

then check your min_engine_version in your manifest.json

glass cloak
# turbid rover The command execute @e[hasitem={location=slot.weapon.offhand,item=mt:torchspeed}...

If you want to convert your functions to the new execute format, then I'm glad to inform you that that's not that hard: Mostly you just have to replace execute @s ~~~ <command> with execute as @s run <command> and if the run command requires a relative location (for example particle or setblock) you can use positioned ~~~ or at @s before you do run <command>. To test for blocks (for example execute @s ~~~ detect ~~~ air me is in air!) it'd be execute as @s at @s if block ~~~ air run me is in air!.
For your command provided above it'd be execute as @e[hasitem={location=slot.weapon.offhand,item=mt:torchspeed}] run effect @s speed 1 1 true, but like Daethie said, that code is not that efficient and it'd be easier to just do what he said.

If you don't want to convert your execute command functions to the new syntax, you can set the min_engine_version in your manifest.json to a version below 1.19.70.

turbid rover
#

I put it in a function and it crashes when I enter, I don't know why.

execute as @e[hasitem={location=slot.weapon.offhand,item=mt:torchspeed}] run event entity @s torchspeed

long prism