Minecraft Mods

Portals v2.0 (Paper Plugin)

  • 12,652 views, 5 today
  • 1,014 downloads, 0 today
  • 22
  • 22
  • 18
IotaSphere's Avatar IotaSphere
Level 37 : Artisan System
21
[ Portals v2.0 (Port) ]

Portals 2.0 is a Paper plugin port of my datapack which adds portal structures to the game.
The portals can travel anywhere in Minecraft and across dimensions. They don't naturally generate and you must craft the spawner to place a portal.

Get the datapack here.



[ Spawning and Despawning ]
To craft a spawner, drop a diamond, end crystal, ender pearl and prismarine crystals atop a respawn anchor. You'll get a spawn egg to place down. The spawn egg displays the bounding box of the portal and will rotate depending on your rotation.

To despawn a portal, place a tnt block on the DHD ( where the soul torch would go ) and confirm by pressing "Yes". The portal will be removed and all items (except for the diamond) will be returned.


[ Using a Portal ]
To activate a portal, place a soul torch on top of the center pillar. Once the torch slides into place, a keypad will open. Using the keypad, enter the ID of the target portal. Portal IDs are displayed above the center column upon activation. To get a list of all portal IDs, use the "/listportals" command. Once the ID is entered, press the blue symbol "-=[@]=-" at the bottom of the keypad. If the ID is valid, the portal will open. By default, portals are one-way (inbound connections show up as red). This can be changed in the config explained below.

Note: You cannot dial yourself.


[ Commands ]
Below is a list of all commands for this plugin. Commands with a red asterisk " *" require an operator to execute
  • * /givespawnegg - Gives the executer a portals spawn egg
  • * /opentimeout - Sets or gets the time (in ticks) until a portal automatically closes
  • * /primedtimeout - Sets or gets the time (in ticks) until a portal automatically un-primes
  • * /keepoldportalframes - Sets or gets whether deleting a portal removes the structure
  • * /updateportalids - Sets or gets whether removing a portal updates other portal IDs to remain synchronous
  • * /showspawneggboundingbox - Sets or gets whether the spawn egg displays its bounding box
  • * /allowduplex - Sets or gets whether two way portals are allowed
  • * /opentimeoutpercent - Sets or gets the percentage of the open timeout a portal will stay open after passing through
  • * /reloadportalstructures - Forcefully reloads all structures; removes any changes to them
  • * /setportalid - Sets the ID of a portal (new ID must be available)
  • * /dialportal - Attempts to open a connection between two portals
  • * /closeportal - Attempts to close a portal
  • * /lockportal - Locks one or more portals; locks all portals if no ID is supplied
  • * /unlockportal - Unlocks one or more portals; unlocks all portals if no ID is supplied
  • * /createportal - Creates a new portal at the set coordinates
  • * /deleteportal - Deletes a portal with the specified ID
  • /listportals - Lists all portals, their location, ID, state, and dimension
  • * /portals2.0 - Opens the Portals plugin configuration manager



[ Portal States ]
Portals have a total of 7 different states, though only 6 matter.
  • IDLE - The portal when idle
  • PRIMED - The portal when a player inserted a soul torch
  • OUTBOUND - The portal during an outbound connection
  • INBOUND - The portal during an inbound connection
  • BLOCKED - The portal if there are non passable blocks inside of the ring
  • LOCKED - The portal when locked
  • SWITCHING - The portal when switching between the other 6 states




[ Other Notes ]
Inbound portals be default display with red particles. Entering the inbound side of a connection will result in your death (does not apply to creative players). This can be disabled by setting the "allowduplex" to true. Duplex portals will show green particles on the inbound side and will simply teleport you back to the dialing portal.

All entities are capable of teleporting through the portals, just in case you have any pets. Just keep in mind that they will need to exit the event horizon before their cooldown wears off ( about 5 seconds ), in which case they might die.

You can block a portal by placing a non-passable block inside of the inner ring. While blocked, the portal will not accept inbound connections and cannot make outbound connections. Locked portals will also refuse any connections.

Any portal in the end will automatically lock if an ender dragon is present. Once the ender dragon is defeated, the portals will unlock.

For non-standard worlds (not any of the 3 base game dimensions), there is a "default_portal" option in the config file for specifying which portal structure to use. Valid portal structure values are "overworld", "nether", and "ender"
You can also specify in the config file, the namespaced key for your world (ex. minecraft:overworld) and a portal structure to use for that world. (Not fully tested so if it doesn't work please leave a comment indicating such)

Example config file
//replace mynamespace:myworldname with the name of your world and set the value to one of "overworld", "nether", or "ender"
open_timeout=200
primed_timeout=600
keep_portal_frames=false
update_portal_ids=true
show_spawn_egg_bounding_box=true
allow_duplex=false
open_timeout_percent=50
default_portal=overworld
mynamespace:myworldname1=overworld
mynamespace:myworldname2=overworld
mynamespace:myworldname3=nether
mynamespace:myworldname4=ender



For any issues or feedback, leave a comment below.
Progress100% complete
Game VersionMinecraft 1.19.2
Tags

5 Update Logs

Update vD-2.1.2 vP-1.2.1 : by IotaSphere 03/10/2023 5:15:31 pmMar 10th, 2023

Overhauled how commands are parsed
Allowed commands to be run from the console
LOAD MORE LOGS

Create an account or sign in to comment.

1
11/04/2023 3:43 pmhistory
Level 1 : New Miner
User4883370G
User4883370G's Avatar
Hello, I'm trying to use this plugin on a Paper 1.20 server and am getting a NumberFormatException on start (full exception details https://pastebin.com/4Ts9PFdB). This exception is a little confusing as it worked in a 1.20.2 server.
Any help would be appreciated.

Thanks

(On a side note, is the source code for the paper port of this plugin available?)
1
11/10/2023 7:55 pm
Level 37 : Artisan System
IotaSphere
IotaSphere's Avatar
I'm not able to reproduce the error.
Can you send the Portals2.0 config file? (located in the server root directory)
Can you also tell the version of paper your using? (paper version not mc version)
1
11/10/2023 1:04 pm
Level 37 : Artisan System
IotaSphere
IotaSphere's Avatar
Sorry for the late response.
The plugin wasn't designed for 1.20 but I'll see about doing a proper upgrade to 1.20.
Thanks for letting me know, I'll look into it.
1
01/24/2023 6:08 amhistory
Level 1 : New Miner
Ijven
Ijven's Avatar
Hi,
I was trying out this plugin but removing portals did not work.
Got the following message:

"Unknown or Incomplete command, see below for error
/SetConfirmBoolean 1 0 <--[​HERE]"

I figured since last remark mentioned uppercase characters I'd retype it with lower case and that worked but this means the UI in chat is broken.

I was hoping this plugin would work with MyWorlds plugin, adding a propper way to link portals instead of just teleporting to the last location you were in. But it seems not to work in the non standard worlds.

Can this be fixed/added?
Great plugin in any case!

Kind regards!
1
01/24/2023 3:31 pmhistory
Level 37 : Artisan System
IotaSphere
IotaSphere's Avatar
Also added config options for allowing portals in other dimensions
Quick fix is to go into config file ("Portals 2.0/config.txt") and adding the line "default_portal=overworld"
You can replace overworld with one of "overworld", "nether", or "ender"
Also also, for individual worlds, you can specify in config file the name of your world and the portal to use (one of "overworld", "nether", or "ender")

For example, if your world is called "Ijven:myworld", add the line "Ijven:myworld=overworld" or whichever portal to use.

Not fully tested so if you get an error comment and send the log so I can fix it.
1
01/24/2023 12:18 pm
Level 37 : Artisan System
IotaSphere
IotaSphere's Avatar
Issue should be resolved
Seems I forgot to change some of the internal command names to lowercase
All of them should be fixed now
1
11/07/2022 4:05 pm
Level 1 : New Miner
Jamo_XD
Jamo_XD's Avatar
this plugin doesnt seem to work on my paper 1.19.2 server. is it only for lower versions?
1
11/07/2022 4:09 pm
Level 37 : Artisan System
IotaSphere
IotaSphere's Avatar
will look into it.
any way for you to share log file?
1
11/10/2022 11:50 am
Level 37 : Artisan System
IotaSphere
IotaSphere's Avatar
Issue resolved
seems to be minecraft no longer likes commands with uppercase characters (which were all of my commands)
1
09/12/2022 10:25 am
Level 1 : New Miner
ekekekek
ekekekek's Avatar
Is there any way you could make this for fabric 1.19? I’m looking to add it to a server, and a plugin this well-developed would be an amazing addition
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome