Minecraft Data Packs / Technology

Portals ( v2.1.1 )

  • check_circle Advancements
  • check_circle Functions
  • 12,441 views, 5 today
  • 1,101 downloads, 1 today
  • 50
  • 55
  • 113
IotaSphere avatar IotaSphere
Level 35 : Artisan System
[ Portals v2.0 ]

"Portals" is a datapack that allows for the creation and usage of portal structures.
These portals allow for travel anywhere in minecraft and work across dimensions.

To get a portal spawner, drop a diamond, ender pearl, prismarine crystals, and an end crystal on top of a respawn anchor. Once placed, the portal will be generated in the facing cardinal direction.

(For those who have worlds with this datapack before version 2.0.0, an upgrade prompt should pop up in the world to upgrade the portals to use markers, if not you can manually enter the command "/function portals:upgrade")

Get the paper plugin version here.

[​ Usage and Removal ]:
To use the portal, place a soul torch on the pillar in front of the portal. The portal id will appear above the portal along with a keypad. Enter the portal id of your destination portal and press the "-=[@]=-" to activate the portal. If the portal is valid and available, it will activate.
(Press [​Q] to leave the interface and [​B] to remove a digit)

Portals will stay active for 200 ticks (10 seconds) and if an entity passes though, will then stay active for only 100 ticks (5 seconds)
The open delay can be controlled by admins using the "/trigger SetOpenDelay set <ticks>" to control how long the portal will stay open. The delay must be greater than or equal to than 20 (1 second)

To remove a portal, simply place TNT on the pillar and press "[​Yes]" to destroy it. Any portal with an ID greater than the one destroyed will have their ID subtracted by 1 (if "UpdatePortalIDs" is true)

There is a list of triggers that can be used in-game. Those with a "*" before them are admin only commands. (To become an admin for the portals datapack, type "/tag @s add pt.operator")

[ ​Commands ]:
* /trigger GetSpawnEgg - Gives you a portal spawn egg
* /trigger LockPortal set [​portaI-id]- Locks the portal with the specified id (locks all portals if no id is supplied)
* /trigger UnlockPortal set [​portaI-id]- Unlocks the portal with the specified id (unlocks all portals if no id is supplied)
* /trigger SetOpenDelay set <ticks> - Sets the time (in ticks) until a portal automatically closes
* /trigger SetPrimedDelay set <ticks> - Sets the time (in ticks) until a portal automatically un-primes
* /trigger KeepPortalFrame - If true, portal frames will not be destroyed when a portal is removed
* /trigger UpdatePortalIDs - If true, portal ids will automatically update when a portal is removed
* /trigger ShowBoundingBox - If true, the bounding box of the portal will be shown around a portal spawn egg
* /trigger AllowDuplex- If true, portals will be two way (inbound portals will have a green event horizon
* /trigger OpendelayPercent- Sets the percentage of time the portal will stay open after an entity has walked through
/trigger SetPortalID set <new_id> - Changes the ID of the target portal (must be within 25 blocks of a portal)
/trigger DialPortal set <target> - Dials the target portal (must be within 25 blocks of a portal)
/trigger ClosePortal - Closes the portal (must be within 25 blocks of a portal)
 /trigger ListPortals - Lists all portals, their state, dimension, and coordinates
/trigger Portals2.0 - Opens portal configuration manager

[ ​Installation ]:
Download ZIP file
Place the ZIP file directly into your datapack directory

[​ Disclaimers ]:
I haven't been able to test this in multiplayer so if you have issues comment them below
Even if not in multiplayer, if you have issues comment them below
You cannot walk into an inbound connection (if the portal is orange/red, don't walk into it)

[​ Other Info ]:

The portal's position and id is stored in a marker, try not to move or kill it (only possible with commands)
Portals will be disabled if the space inside the dark prismarine ring has any non-passable blocks in it. While disabled, inbound connections are ignored and the portal cannot be activated
Bounding boxes currently use particles to display (may be changed if it's too laggy)
Bounding boxes have a red dot indicating the position of the basalt center of the portal
Portals will only work within the three vanilla dimensions, for dimensions in other datapacks, I will have to manually add them

Feel free to leave feedback for improvements or suggestions

[ ​Changelog ]:
Version 1.0.1:
  Fixed issue with portal not activating (forgot to run one of the loop functions in loadmaster)
Version 1.0.2:
  Fixed portal delay being zero on first portal spawn
Version 1.1.0:
  Added LDM trigger to reduce particles Suggestion by kenton0910
  Added command to give spawn egg
Version 1.2.0:
  Added command to set portal ID Suggestion by TitanBorn19
Version 1.3.0:

  Added command to toggle portal frame deletion Suggestion by Zootaloo
  Added command to toggle portal ID update function when a portal is deleted Suggestion by Zootaloo
  Changed netherite in portal structure to blackstone Suggestion by Zootaloo
Version 1.4.0:

  Added command to decrease execution of master tick file Suggestion by Alpacaagam
Added bounding box when either holding a spawn egg or when spawn egg is dropped Suggestion by Cosmic_Smoothie

Version 1.4.1
  Fixed function call failure due to tick overflow
Version 1.4.2
  Fixed tickmaster function execution failure due to score issues
Version 1.4.3
  Re-fixed tickmaster function execution failure due to score issues
Version 1.4.4
  Moved critical function to solve portals not spawning
Version 1.4.5
  Fixed massive issue with tick clock preventing execution of most functions
Version 1.4.6
  Fixed issue with scores not allowing portal ID change
Version 1.5.0
  Added dial trigger to dial a gate Suggestion by NightOps
  Added close trigger to close a gate
  Removed LDM trigger and made some particles respond to minecraft particle settings instead
Version 1.5.1
  Moved some commands to new file (executes once every 2 ticks to help decrease server load)
Version 1.5.2
  Moved animation commands to original file to smooth animations
  Added portalList trigger to show all portals in world
Version 1.5.3
  Moved portal timer to tickmaster to increase timer accuracy
  Fixed issue with portal open delay not being set on new world or score reset (caused portal to instantly close)
Version 1.5.4
  Fixed issue with server failing to load datapack (invalid recipe JSON)
Version 1.5.5
  Fixed issue with player rotation causing portal to not spawn
Version 2.0.0
  Complete rewrite of portals code (hopefully to fix certain bugs)
  Portal structures now vary depending on their dimension
  Some advancements renamed
Version 2.1.0
  Added config option to allow two way portals Suggestion by VrMistake
  Added config option to set the percentage of the open delay until a portal closes after transit
  Fixed issue with lock/unlock animation spewing redstone torches
  Fixed issue with unblocking a portal spawning an extra soul torch
Version 2.1.1
  Updated pack format version to 10
CompatibilityMinecraft 1.17
toMinecraft 1.19

Create an account or sign in to comment.

02/23/2022 1:55 pm
Level 35 : Artisan System
IotaSphere avatar
syrupwaf, User3955666G, Sparky__, ParagonTheParagon
Hello, I've just released a Paper plugin port of this datapack here. Let me know how well it works for you.
02/22/2022 6:46 pm
Level 1 : New Miner
ParagonTheParagon avatar
the best teleportation data pack i have ever seen however the command do not work anymore i don't think you will see this but this was a great data pack. I'm not sure what the problem is and i have tryed to figure it out...
02/23/2022 12:35 am
Level 35 : Artisan System
IotaSphere avatar
Do you know what isn't working? Portal spawning, activating, etc...?
01/05/2022 7:24 pm
Level 1 : New Explorer
Sparky__ avatar
Hello, this data pack is so much fun, me and my friends absolutely love it. [ 1.18.1 realm ]

However, we have run into an issue where only Server operators can use the portals, I saw that others had previously experienced this issue too.

  • I tried re-uploading the data pack with it unzipped.
  • I tried the /tag user add pt.operator and the data pack said that the command worked however the person still couldn't use the portals.
  • When I OP a user they can use the portal.

Since we are a small group this doesn't effect us too much but if any new members were to join (people we dont trust with OP) and try to use it they wouldn't be able to.

Error code for non op players:

/execute if entity @s[​tag=dialer] run scoreboard players set @s pt.dhd.digit 2<--[​HERE]

Hopefully this can be fixed as this data pack is so much fun when working.
01/06/2022 3:19 am
Level 35 : Artisan System
IotaSphere avatar
I've noticed the issue a lot as well, and I find it odd servers don't seem to like "/execute", which is critical for this datapack. I'm considering porting this over to a paper plugin for server uses.
12/21/2021 4:02 pm
Level 1 : New Miner
User3955666G avatar
Hi I'm running this on my Server, and even when I've given everyone the pt.operator role, nobody is able to use it but regular Server Op's. I tried extracting it from the .zip but then it didn't work at all. Oddly enough triggers would still run, but portals didn't work at all.
12/22/2021 2:09 am
Level 35 : Artisan System
IotaSphere avatar
Ok I'll have to see what's going on. I've had issues with triggers not working on servers but I'll have to look into why portals don't work.

Does the soul torch engage? if not, try running a test to see if the marker (server entity housing all portal data) is there using "/trigger ListPortals".
12/22/2021 3:12 am
Level 1 : New Miner
User3955666G avatar
I've fixed the zip issue, Portals do work but only Server Operators can use them. I can activate them just fine, and people can come through with me. But if someone without Operator tries to use it they get the "You don't have permissions for that", even though I've given everyone the "pt.operator" Tag.
12/22/2021 8:29 pm
Level 35 : Artisan System
IotaSphere avatar
I don't think this is entirely on my end, as the datapack has no operator check for engaging a portal. I think the server is preventing the execution of some datapack commands for non-opped users. Try setting your "function-permission-level" to 1. As of now, activating a portal runs commands as the user (because the datapack needs to know who activated the portal) so I can't fix it directly. The function-permission-level should allow the datapack to execute commands as a non-opped user
09/25/2021 10:15 pm
Level 14 : Journeyman Waffle
syrupwaf avatar
When putting this into an Aternos server, for some reason it doesn't do anything. There's no new commands in /trigger and the Respawn Anchor method doesn't work. I later checked the console when using /datapack list and it showed the error;

Couldn't get pack info for: net.minecraft.server.packs.ResourceNotFoundException: 'pack.mcmeta' in ResourcePack './world/datapacks/portals.zip'

Planet Minecraft


© 2010 - 2023