Skip to content

Commit

Permalink
Add debug block for checking safe location
Browse files Browse the repository at this point in the history
  • Loading branch information
benwoo1110 authored Feb 25, 2025
1 parent fe0be3e commit a9fd4db
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,19 @@ public boolean canSpawnAtBlockSafely(@NotNull Block block) {
Logging.finest("Checking spawn safety for location: %s, %s, %s", block.getX(), block.getY(), block.getZ());
if (isUnsafeSpawnBody(block)) {
// Player body will be stuck in solid
Logging.finest("Unsafe location for player's body.");
Logging.finest("Unsafe location for player's body: " + block);
return false;
}
Block airBlockForHead = block.getRelative(0, 1, 0);
if (isUnsafeSpawnBody(airBlockForHead)) {
// Player's head will be stuck in solid
Logging.finest("Unsafe location for player's head.");
Logging.finest("Unsafe location for player's head: " + airBlockForHead);
return false;
}
Block standingOnBlock = block.getRelative(0, -1, 0);
if (isUnsafeSpawnPlatform(standingOnBlock)) {
// Player will drop down
Logging.finest("Unsafe location due to invalid platform.");
Logging.finest("Unsafe location due to invalid platform: " + standingOnBlock);
return false;
}
Logging.finest("Location is safe.");
Expand Down

0 comments on commit a9fd4db

Please sign in to comment.