More changes, im going to bed
This commit is contained in:
@@ -53,11 +53,11 @@ made changes too. It returns a function that unhooks it.
|
||||
|
||||
## What's in `engine`
|
||||
|
||||
| Side | Where | Like |
|
||||
| -------- | -------------- | ------------------------------------------------------------------------------------------- |
|
||||
| `common` | every script | `EverythingRegistry`, `ItemStack`, `Container`, `BlockRules`, `OverworldTerrain`, `physics` |
|
||||
| `server` | server scripts | `GameServer`, `ServerWorld`, `ServerPlayer`, `Entity`, `Mob`, `ModRuntime`, the mob goals |
|
||||
| `client` | client scripts | `Client`, `LocalPlayer`, `ClientLevel`, `GameRenderer`, `Camera`, `GuiScreen` |
|
||||
| Side | Where | Like |
|
||||
| -------- | -------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `common` | every script | `EverythingRegistry`, `ItemStack`, `Container`, `BlockRules`, `NoiseTerrain`, `physics` |
|
||||
| `server` | server scripts | `GameServer`, `ServerWorld`, `ServerPlayer`, `Entity`, `Mob`, `ModRuntime`, the mob goals |
|
||||
| `client` | client scripts | `Client`, `LocalPlayer`, `ClientLevel`, `GameRenderer`, `Camera`, `GuiScreen` |
|
||||
|
||||
The full lists are in `common/engine_modules.ts`, `server/game/engine_modules.ts` and `client/engine_modules.ts`. The
|
||||
types are the engine's own source, so `check-mods` typechecks against exactly the engine the mod runs on. `cubi/engine`
|
||||
@@ -68,7 +68,7 @@ also exports `game_version`, the version of the game that's running.
|
||||
- `#private` members can't be hooked. They're kept for things with rules that must hold, like a container's slots.
|
||||
- Hooks reach one JavaScript realm. Chunk workers run their own copy of the engine, so a client hook doesn't change
|
||||
meshing. The server generates chunks in worldgen workers, and each loads the worldgen scripts into its own copy, so
|
||||
hooks on the terrain (`engine.common.OverworldTerrain`) go in the worldgen script. A server script's hooks there only
|
||||
hooks on the terrain (`engine.common.NoiseTerrain`) go in the worldgen script. A server script's hooks there only
|
||||
reach the few chunks the game generates itself, so the world would come out different in places.
|
||||
|
||||
## Performance
|
||||
|
||||
Reference in New Issue
Block a user