Nomifactory / DimensionalEdibles

Travel through dimensions with food!
https://www.curseforge.com/minecraft/mc-mods/dimensional-edibles-omnifactory-edition
GNU Lesser General Public License v3.0
3 stars 6 forks source link

Fix players spawning at Y = 0 after teleportation #3

Closed ALongStringOfNumbers closed 3 years ago

ALongStringOfNumbers commented 3 years ago

Fixes players being spawned at Y = 0, or on top of the Nether roof after failing to find a suitable teleportation position into the Nether.

See #1 for the analysis. This PR is a continuation of that PR, but switched to this fork, instead of on my fork.

Notice, while testing this, I did spawn in lava one time, so it would be good if we could figure out how to include not spawning in lava as part of the 2 high empty block check.

Edit: Note an easy way to test this PR would be to set dimPos to null in the getDimPos method. This will force the creation of a new spawning location every time the player travels to the nether.