[MINECRAFT 1.8.9]
So I have an endportal constantly spawning 4 blocks above the player with this command:
/execute @a ~ ~ ~ setblock ~ ~4 ~ minecraft:end_portal
and I want the portal to disappear when I move one block away in any direction from it so that it "follows you".
So I have these commands running on a fast clock:
execute @a ~ ~ ~ fill ~-3 ~ ~-1 ~3 ~ ~-3 air 0 replace end_portal
execute @a ~ ~ ~ fill ~-3 ~ ~1 ~3 ~ ~3 air 0 replace end_portal
execute @a ~ ~ ~ fill ~1 ~ ~ ~3 ~ ~ air 0 replace end_portal
execute @a ~ ~ ~ fill ~-1 ~ ~ ~-3 ~ ~ air 0 replace end_portal
These are supposed to remove all endportals around you but not above or below your current position
For some reason it's not working