2

Do you see a problem with this command? i don't, but minecraft does. help?

web_warrior_geo_1's Avatar web_warrior_geo_14/8/24 1:57 pm
2 emeralds 125 5
4/8/2024 7:13 pm
michaelo's Avatar michaelo
the command is this:

"/execute as @e[tag=sportal] at @s positioned ~-2.5 ~6 ~8.5 if entity @e[type=minecraft:zombie,distance=..2] positioned ~2.5 ~6 ~8.5 if entity @e[type=minecraft:zombie,distance=..2] run..."



the if parameters are both met, and i know that for a fact because when i use

"positioned ~-2.5 ~6 ~8.5 if entity @e[type=minecraft:zombie,distance=..2]"

and

"positioned ~2.5 ~6 ~8.5 if entity @e[type=minecraft:zombie,distance=..2]"

individualy it works.

so what wrong here?
Posted by web_warrior_geo_1's Avatar
web_warrior_geo_1
Level 1 : New Miner
1

Create an account or sign in to comment.

5

1
04/08/2024 4:47 pm
Level 39 : Artisan Mage
Arkaliasus
Arkaliasus's Avatar
wtf is a sportal ? xD
2
04/08/2024 6:48 pm
Level 1 : New Miner
web_warrior_geo_1
web_warrior_geo_1's Avatar
it's a portal, but i have multiple, so this one is an s portal, a sportal
2
04/08/2024 3:29 pmhistory
Level 32 : Artisan Chef
michaelo
michaelo's Avatar
If you run the parameters individually, each one will be based off the context from the at @s. If you combine them into one command one after the other, the last positioned will add on to the previous positioned, so effectively at the end of your command it acts as ~0 ~12 ~17.

It looks like you're trying to check ~-2.5 and ~2.5 of a position. You already set one coordinate with the first positioned, so to get from -2.5 to 2.5 for the second, you need to add 5, making it positioned ~5 ~ ~. Think of it like you're moving from place to place.

Hopefully that is what you're trying to do. Out of curiosity, what's the goal of this?
1
04/08/2024 6:50 pm
Level 1 : New Miner
web_warrior_geo_1
web_warrior_geo_1's Avatar
thank you, this actualy makes a lot of sense, i feel kinda stupid for not realizing it.
2
04/08/2024 7:13 pm
Level 32 : Artisan Chef
michaelo
michaelo's Avatar
No problem, I've also done the exact same thing!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome