Tooltips
This commit is contained in:
@@ -1032,15 +1032,16 @@ export class GameServer {
|
||||
}
|
||||
};
|
||||
|
||||
const inventory = player.inventory.to_data();
|
||||
// with lore, so it's resent when only the lore changed
|
||||
const inventory = player.inventory.to_synced_data();
|
||||
sync("inventory", inventory, () => ({ type: "container", container: "inventory", items: inventory }));
|
||||
const crafting = player.crafting.to_data();
|
||||
const crafting = player.crafting.to_synced_data();
|
||||
sync("crafting", crafting, () => ({ type: "container", container: "crafting", items: crafting }));
|
||||
const cursor = player.cursor.item?.to_data() ?? null;
|
||||
const cursor = player.cursor.item?.to_synced_data() ?? null;
|
||||
sync("cursor", cursor, () => ({ type: "cursor", item: cursor }));
|
||||
|
||||
if (player.screen) {
|
||||
const items = player.screen.container.to_data();
|
||||
const items = player.screen.container.to_synced_data();
|
||||
sync("screen", items, () => ({ type: "container", container: "screen", items }));
|
||||
const properties = { ...player.screen.properties };
|
||||
sync("properties", properties, () => ({ type: "screen_properties", properties }));
|
||||
|
||||
Reference in New Issue
Block a user