Posted December 10, 201410 yr For a mod I am making, I have an item that teleports a player to spawn, but it can teleport players underground, does anyone have a way to make it so it always teleports players to the surface?
December 10, 201410 yr The "spawn point" can actually be a coordinate that is underground. You'll need to write some sort of function that checks for that and returns more suitable coordinates nearby instead of trusting the location of the spawn point.
December 10, 201410 yr You only need to get the exact coordinates of the spawn and than call player.setPositionAndUpdate(spawnX, spawnY, spawnZ);
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.