World shape for dimension
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
import { ClientMessage, EntityInfo, MenuSlotInfo, PlayerInfo, ServerMessage } from "@/common/protocol.ts";
|
||||
import type { ModListing } from "@/common/mod_loader.ts";
|
||||
import { WorldShape } from "@/common/world_shape.ts";
|
||||
import type { Join, ServerSocket, Welcome } from "./handshake.ts";
|
||||
|
||||
export class Connection {
|
||||
@@ -12,6 +13,8 @@ export class Connection {
|
||||
mods: ModListing[];
|
||||
// the server's block id for each of its numeric ids, for reading chunks
|
||||
server_blocks: string[];
|
||||
// the dimension's height and sky light
|
||||
shape: WorldShape;
|
||||
spawn: { x: number; y: number; z: number; yaw: number; pitch: number };
|
||||
selected_slot: number;
|
||||
// the slots mods added to menu 0
|
||||
@@ -27,6 +30,7 @@ export class Connection {
|
||||
this.name = join.name;
|
||||
this.mods = welcome.mods;
|
||||
this.server_blocks = join.blocks;
|
||||
this.shape = new WorldShape(join.shape);
|
||||
this.spawn = join.spawn;
|
||||
this.selected_slot = join.selected_slot;
|
||||
this.player_menu = join.player_menu;
|
||||
|
||||
Reference in New Issue
Block a user