Disabling nether portal functionality

Disabling nether portal functionality - Top view contemporary mobile phone with opened website on screen placed on wooden table

I need to know how to disable the nether portal from taking you into the nether, and instead, to tp you somewhere else in the overworld. Is it possible to do this on a commandblock or with redstone in a single player puzzle map without mods?



Best Answer

You can use execute's detect syntax to increment a score while a player is inside the portal. Set up the objective:

/scoreboard objectives add portalTimer dummy

Create a Repeat/Chain command block line (Fill clock in 1.8), and put the following commands

/scoreboard objectives remove @a[score_portalTimer_min=1] portalTimer 1
/execute @a ~ ~ ~ detect ~ ~ ~ minecraft:portal -1 /scoreboard objectives add @a[c=1] portalTimer 2
/tp @a[x=<x1>,y=<y1>,z=<z1>,r=10,score_portalTimer_min=60] <x2> <y2> <z2>
/tp @a[x=<x2>,y=<y2>,z=<z2>,r=10,score_portalTimer_min=60] <x1> <y1> <z1>
/scoreboard players set @a[score_portalTimer_min=60] portalTimer 0

The first two commands will increase portalTimer by one for every tick for all players within the portal, and decrease it by one for players outside a portal (to a minimum of 0).

The third and fourth command teleport players that have been in the portal for 3 seconds. Replace <x1> <y1> <z1> and <x2> <y2> <z2> with coordinates just outside (!) of the first and second portals.

The last command resets the timer after teleporting. This shouldn't be strictly necessary, but it's better to have at any rate.




Pictures about "Disabling nether portal functionality"

Disabling nether portal functionality - Man in White Pants Holding Microphone
Disabling nether portal functionality - Woman in White Tank Top and White Pants Holding Black and White Sports Bottle
Disabling nether portal functionality - Man in White Crew Neck T-shirt Holding White and Gray Sports Bottle





How to Unlink Nether Portals in Minecraft




More answers regarding disabling nether portal functionality

Answer 2

Check out this video.
It is basically a timer system where milliseconds before the player is teleported to the nether, they are teleported to another overworld portal instead. You can also do this with dispensers holding either mobs or items, that would instad fall on a pressure plate.

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Alif Sagor, Polina Tankilevitch, Polina Tankilevitch, Polina Tankilevitch