options: wand: stick named "&5PortalWand" portalBedrockRegion: Portal_Nether_At_Bedrock portalOneRegion: portal1 portalTwoRegion: portal2 worldOverworld: world worldNether: world_nether function getCorrectLocation(p: player, loc: location, w: world) :: location: set {_x} to x-loc of {_loc} set {_y} to y-loc of {_loc} set {_z} to z-loc of {_loc} set {_yaw} to {_p}'s yaw set {_pitch} to {_p}'s pitch return location({_x}, {_y}, {_z}, {_w}, {_yaw}, {_pitch}) on portal: if "%region at player%" contains "{@portalOneRegion}" or "{@portalTwoRegion}": if 1 is 1: if 2 is 2: set {_t} to true if {_t} is not set: teleport player to getCorrectLocation(player, {defaultNetherPortal}, "{@worldNether}" parsed as world) else: teleport player to getCorrectLocation(player, {portalNetherAtBedrock}, "{@worldNether}" parsed as world) if "%region at player%" contains "{@portalOneRegion}": set {netherPortal::%player%} to 1 else if "%region at player%" contains "{@portalTwoRegion}": set {netherPortal::%player%} to 2 else if "%region at player%" contains "{@portalBedrockRegion}": set {netherPortal::%player%} to 1 if {netherPortal::%player%} is not set teleport player to getCorrectLocation(player, {portal%{netherPortal::%player%}%}, "{@worldOverworld}" parsed as world) on left click: player's tool is {@wand} set {portal1} to location of block above clicked block on right click: player's tool is {@wand} set {portal2} to location of block above clicked block command /portalwand: trigger: player is op give player {@wand}