Custom Portals

Custom Portals

137k Downloads

Issue / Suggestion | Improved Portal Connections

Kazuhiko-Gushiken opened this issue ยท 3 comments

commented

Currently, the method that he mod uses to connect portals is by the block used in the portal frame and the color of the portal itself. This is limited due to some colors being more popular than others. Also, on servers this becomes a problem where some blocks might want to be used with a color than many others want to use as well.

My suggestion to fix this is instead of connecting two portals based off frame and color, each set of portal catalysts generates a number or ID that corresponds to the pair upon crafting. This is what will connect two portals. Now, this allows multiple people to use not only the same color portal but the same blocks as the frame.

Addition: If possible, make it so the blocks of the frame do not need to be the same block, and we can use combinations of blocks to assist in incorporating portals into builds. From a linking standpoint, the blocks no longer need to be the same due to them not being used to link portals, but only there to contain the portal.

P.S. I had sent a message to you on Discord about this because I really wanted to use this mod for a large modpack, but that was before I realized you weren't the most active. But, if you ever get the time and are willing to incorporate this system instead, I can't wait to add it to the modpack!

commented

Thanks for the suggestions!

I do want to point out that the way portal linking currently works actually does allow for infinitely many pairs of portals with the same frame/color combination to be linked. When a portal is created, it searches for the database for another portal with the same frame and color to link to. However, if a pair of portals is already linked, and a third portal is created with the same frame and color, it's treated as if that's the first portal with that frame and color that has been created, Then if you make a fourth portal with that frame and color, it will link to the third one. Essentially portals can only link to other portals that aren't yet linked.

That being said, I will admit this is still a flawed system. It can still cause issues if someone on a multiplayer server is trying to make their own pair of portals, and another player somewhere else has already constructed a single, abandoned unlinked portal with that same frame and color. I wasn't thinking as much about how this would work on servers as I probably should have since I mostly play single player. So this is something that could be improved on for sure.

With the ID system you suggest, it would mean catalysts with different IDs probably couldn't stack so you can differentiate between them, and if for some reason you lose one, the other effectively becomes a dead item. Another solution that would be a bit more streamlined would be to add a "Private Portals" option in the config to make portal linking dependent on the UUID of the player who activated them. That way each player could have their own private set of portals without other players' portals interfering.

As for portals with frames that aren't all the same block, I'd have to figure out a way to make that work, but I'll keep it in mind for the future.

And yeah, I don't check my discord super often, sorry about that

commented

@Palyon-dev No worries about checking discord, I'm just super super happy I eventually got this to you! I have really been wanting to add this mod to All of Fabric 7 officially, since the one we currently have is way way more janky than this one (no offense).

A private portals config would be nice. As long as it'd also allow for a single person to create multiple sets of a possibly same portal configuration, since I can see myself personally using a regular default nether portal look-a-like configuration a lot in some scenarios. I can't wait to see what you come up with and if I can be of any help, do reach out to me! I'm officialkeno on discord and I can help with ideas, since I'm not the most knowledgeable in coding.

P.S. In your previous response to my old (honestly not fully thought through) suggestion of clear portals, you mentioned you saw I forked it and added it myself. I am guilty, I never actually added them correctly. All I did was register the item, as an item. From my knowledge, it didn't even work (never tried).

Either way! Thank you for responding! And Merry Christmas!

commented

Private portal config option is now available on v3.3.0!
Also I may revisit the clear portals suggestion in the future. It sounded odd to me at first but it's grown on me the more I've thought about it :)