Skip to content

Commit

Permalink
Fix spawn pos
Browse files Browse the repository at this point in the history
  • Loading branch information
WenXin20 committed Mar 5, 2025
1 parent c5e638f commit 671e9e6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,26 +129,26 @@ public void serverTick(@NotNull ServerLevel serverWorld, BlockPos pos) {
switch (facing) {
case UP:
x = spawnPos.getX() + 0.5;
y = spawnPos.getY() + 0.1; // Slightly above the block
y = spawnPos.getY() + 0.1;
z = spawnPos.getZ() + 0.5;
break;
case DOWN:
x = spawnPos.getX() + 0.5;
y = spawnPos.getY() - entityHeight - 0.1; // Below the block
y = spawnPos.getY() + entityHeight + 0.1;
z = spawnPos.getZ() + 0.5;
break;
case NORTH:
x = spawnPos.getX() + 0.5;
y = spawnPos.getY();
z = spawnPos.getZ() - entityWidth - 0.1; // Slightly in front
z = spawnPos.getZ() + entityWidth + 0.1;
break;
case SOUTH:
x = spawnPos.getX() + 0.5;
y = spawnPos.getY();
z = spawnPos.getZ() + entityWidth + 0.1;
break;
case WEST:
x = spawnPos.getX() - entityWidth - 0.1;
x = spawnPos.getX() + entityWidth + 0.1;
y = spawnPos.getY();
z = spawnPos.getZ() + 0.5;
break;
Expand Down

0 comments on commit 671e9e6

Please sign in to comment.