Mrbysco / TelePastries

Pastries teleporting players.
https://www.curseforge.com/minecraft/mc-mods/telepastries
MIT License
2 stars 8 forks source link

Improve Cake Teleportation Logic #16

Closed ChampionAsh5357 closed 1 year ago

ChampionAsh5357 commented 1 year ago

Closes #1

Improves the teleportation logic when using a cake.

It checks the following to determine where to teleport. All locations check for a safe block underneath and that the bounding box of the entity is not in anything unable to spawn.

  1. Has the entity teleported from a cake in the other world? If so, spawn at that location.
  2. Loop through a sixteen block area from top to bottom to check for a safe position for the entity to spawn.
  3. Create a safe location at the position the entity is in.

Further work should look into better compatibility layers with other mods like #7. Though, honestly, that could use an entire rewrite to support basic datapack structuring and a custom plugin handler for more complex teleports.

Mrbysco commented 1 year ago

The only functionality that has changed is that the End cake no longer teleports you to the obsidian platform