Send block data to clients

This commit is contained in:
2026-10-13 23:26:10 -03:00
parent a10b15a3fd
commit 55ad08266e
18 changed files with 283 additions and 90 deletions
+2
View File
@@ -294,6 +294,8 @@ function client_context(listing: ModListing): ClientContext {
if (nid === AIR) return AIR_ID;
return EverythingRegistry.get_by_id<BlockRegistry>("blocks", nid)?.id;
},
get_client_data: (x, y, z, field) =>
structuredClone(need_client().level.get_block_data(x, y, z)?.[field]) as never,
biome_at: (x, z) => rules_world.biome_at(x, z),
season_at: (x, z) => rules_world.season_at(x, z),
get time() {