AllenSeitz / DimDungeons

A Minecraft mod which adds proceedurally generated dungeons.
14 stars 11 forks source link

Changed portals so they lead to each other instead of dumping player at respawn/spawn #13

Closed Rimevel closed 3 years ago

Rimevel commented 3 years ago

With this change portals are now tile entities that manage their destination by themselves. When inserting a key in a keyhole, the generated portals in both dimensions are given their destination in the opposite.

AllenSeitz commented 3 years ago

Wow thank you!! I have work today but I'm going to check this out tonight.

AllenSeitz commented 3 years ago

Off the top of my head though, what about the rooms with alternate exit portals? I only have two right now. I guess I can take those alternate exits out. (And actually magicpuzzle_1, the frost walker igloo room, is temporarily out of the rotation for another bug.)

Rimevel commented 3 years ago

Rooms with alternate exit portals should be fine. I did not run into any during my testing, but all exit portals, no matter where they are in the dungeon, should work the exact same way.

Rimevel commented 3 years ago

Also if you dont plan to use the capability stuff, it can probably be cleaned up/removed since this does not touch that in any way.

Rimevel commented 3 years ago

Ah right, I did not consider the fact that you can re-open the portal elsewhere facepalm Sorry for that oversight. I hope its easy to fix. I will be interested to see how you solve that. As for credit to any contributors, maybe a secret credits room (broken wall instead of door) that sometimes spawn? That could be cool :D

AllenSeitz commented 3 years ago

Yeah it was simple. Since the key itself knows the coordinates to teleport the player to all I have to do is look at the arrival position, zpos + 2, xpos -0 and -1, and ypos range [55..57], and I know where the 6 return portal blocks are. Seems to be working great!

Back to working on 1.09. I'll include this change in that version.