mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
log when spawn found
This commit is contained in:
+3
-2
@@ -105,11 +105,12 @@ public class BukkitChunkGeneratorWrapper extends org.bukkit.generator.ChunkGener
|
|||||||
int y = world.getMaxHeight() - 1;
|
int y = world.getMaxHeight() - 1;
|
||||||
|
|
||||||
int max = 500;
|
int max = 500;
|
||||||
for(int i = 0; i < max; i++) { // 50 attempts.
|
for(int i = 0; i < max; i++) {
|
||||||
BukkitWorldProperties properties = new BukkitWorldProperties(world);
|
BukkitWorldProperties properties = new BukkitWorldProperties(world);
|
||||||
while(y > world.getMinHeight() && delegate.getBlock(properties, x, y, z, pack.getBiomeProvider()).isAir()) y--;
|
while(y > world.getMinHeight() && delegate.getBlock(properties, x, y, z, pack.getBiomeProvider()).isAir()) y--;
|
||||||
|
|
||||||
if(((BlockData) delegate.getBlock(properties, x, y, z, pack.getBiomeProvider()).getHandle()).getMaterial().isSolid()){
|
if(((BlockData) delegate.getBlock(properties, x, y, z, pack.getBiomeProvider()).getHandle()).getMaterial().isSolid()) {
|
||||||
|
LOGGER.info("Found spawn on attempt {}", i + 1);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
x = random.nextInt(-500, 500);
|
x = random.nextInt(-500, 500);
|
||||||
|
|||||||
Reference in New Issue
Block a user