Posted March 6, 20178 yr I want to teleport a player far away from his position.The problem is that if there are structures i don't know how detect them. How can I prepare the destination area so that i can check if there are air blocks to put player in or search for nearby acceptable destination? Thx.
March 6, 20178 yr Author To make it more clear... I use this loop to load destination area: for (int i = -radius; i <= radius; i++) { for (int j = -radius; j <= radius; j++) { worldserver.getChunkProvider().provideChunk((posX >> 4) + i, (posZ >> 4) + j); } } Then i use worldserver.getBlockState(pos1).getMaterial().blocksMovement() to see if a block is acceptable. But if there is a structure the block result free as if the structure is not loaded.
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.