I'm trying to make an area that upon entering your gamemode turns to adventure if you were in survival and on leaving the opposite happens. I know of several ways to do this, but for my requirements I need it to be a rectangular area and relative to the command block's position. This is one of the commands I have on a repeat block:
I'm trying to make an area that upon entering your gamemode turns to adventure if you were in survival and on leaving the opposite happens. I know of several ways to do this, but for my requirements I need it to be a rectangular area and relative to the command block's position. This is one of the commands I have on a repeat block:
/gamemode adventure @a[gamemode=survival,x=~,y=~,z=~,dx=25,dy=25,dz=25]
It works if it is given a definite position instead of the ~ ~ ~, but I need it relative. Is there a way to make this work?
You can use the execute function :
I like trains... OF CHAIN COMMAND BLOCKS !
Ah, that works, thanks!