- glm::ivec3 chunk(pos);
- chunk /= Chunk::Extent();
- pos -= chunk;
- EntityState state = player.GetEntity().GetState();
- state.chunk_pos = chunk;
- state.block_pos = pos;
- player.GetEntity().SetState(state);
+ EntityState state = ctx.GetPlayer().GetEntity().GetState();
+ state.pos = ExactLocation(pos).Sanitize();
+ ctx.GetPlayer().GetEntity().SetState(state);
+
+ stringstream msg;
+ msg << ctx.GetPlayer().Name() << " teleported to " << pos;
+ ctx.Broadcast(msg.str());