Skip to content

Commit

Permalink
Fix countdown behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
ellieisjelly committed Dec 8, 2024
1 parent 5bb3082 commit 077f4d1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,9 @@ public void onTick() {
Vec3d pos = map.getPlayerSpawns().get(new PlayerRef(plr.getUuid()));
// Set X and Y as relative so it will send 0 change when we pass yaw (yaw - yaw = 0) and pitch
Set<PositionFlag> flags = ImmutableSet.of(PositionFlag.X_ROT, PositionFlag.Y_ROT);

// Teleport without changing the pitch and yaw
plr.networkHandler.requestTeleport(new PlayerPosition(pos, new Vec3d(0, 0, 0), plr.getYaw(), plr.getPitch()), flags);
plr.teleport(plr.getServerWorld(), pos.getX(), pos.getY(), pos.getZ(), flags, 0, 0, false);
}
}

Expand Down

0 comments on commit 077f4d1

Please sign in to comment.