I don't know if there is a better way to do this, but I worked out the following by looking at Youtube videos about custom portals. It involves using commands, so in survival you have to temporarily enable cheats to do it.
First, make a backup of your entire world directory, in case something goes wrong!
Make a note of the coordinates of the portal(s) that are not working correctly. You can do this very easily using f3
and pointing at the portal. Possibly not quite so easy is to find the coordinates of the return portal. If you can use another portal to travel there you can use f3
in the same way to find its coordinates. Alternatively if you have a backup of your world you may be able to use that to find the right coordinates, or you can find an alternative 'safe' place to point the portal to. You may find @Fabian's tips in the comments below this answer useful to get the coordinates.
Turn on cheats by opening your world to LAN (ESC
, then Open to LAN
, toggle Allow Cheats: ON
and then Start LAN World
).
Use the following sequence of commands (coordinates for the portal are x
, y
, z
; coordinates for the destination are m
, n
, o
):
/setblock x y z air 0 replace
/setblock x y z end_gateway 0 replace {ExitPortal:{X:m,Y:n,Z:o},ExactTeleport:0}
The first line deletes the malfunctioning gateway block at x
, y
, z
and replaces it with air. I found this was necessary because I could not directly replace the gateway block with another one. Without this you just get a message to say the block was not placed.
The second line places a new gateway block in the same location, and points it to teleport to coordinates m
, n
, o
, with the 'normal' end gateway behaviour.
Save your game and restart it to close the LAN, and the portal should now work.
If you are unable to find the correct coordinates for the destination, it may be safer to find another place to use as the teleport target, and use ExactTeleport:1
.
Maybe this can help you
/setblock ~ ~1 ~ minecraft:mob_spawner 0 replace {SpawnCount:1,SpawnRange:5,RequiredPlayerRange:5,MaxNearbyEntities:25,Delay:50,MinSpawnDelay:25,MaxSpawnDelay:50,SpawnData:{id:"minecraft:Item",Item:{id:bone,Count:10}}}
This command will spawn a mobspawner that spawns bone. The website that i used was THIS one
Best Answer
You cannot do this using commands because third person is a client POV. However, you can give yourself invisible blocks with the: " /give your username barrier " command by writing it in the chat. (That is, assuming you have access to commands.) Once you have these barrier blocks, you place them one block above the player everywhere you do not want the player to have f5 mode. You see, barrier blocks are invisible, but they have a collision blocks: they count as solid blocks. There are advantages and disadvantages: when the player enters third person, their view will be blocked like they had a block above their heads, even though it looks like they don't. However, they can still use it horizontally.