Potions can survive at y=65

One potion was thrown into the void, but instead of being killed, it just lingered there.

Any ideas to kill it? I can't just run /kill @e[type=!player,tag=test1]

(yes, the tag of the entity is indeed test1 )


First, create a scorebaord called "y".

/scoreboard objectives add y dummy

Then, the following commands are:

/execute as @e[tag=test1,type=!player] store result score @s y run data get entity @s Pos[1]
/kill @e[scores={y=65}]

The first one will give the score to the Potions acording to their Y axis and the second one will kill every entity that has their y coordinate to 65. Note that it will only work in that specific hight.

If you wish to kill everything from 65 and above use:

/kill @e[scores={y=65..}]

Side note: The void is actually under the 0 Y axis and not above or in the 65. Not sure what you meant there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.