From a3d8966ca4a268e2c30abd97bd0c75fcbeb8f6f8 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Sun, 10 Mar 2024 14:15:58 -0500 Subject: [PATCH] docs(guides/extending): update `/core/` to the new `/init/` (#2404) --- docs/pages/guides/extending-a-world.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/pages/guides/extending-a-world.mdx b/docs/pages/guides/extending-a-world.mdx index 3dcfbc08a2..6369f9ef67 100644 --- a/docs/pages/guides/extending-a-world.mdx +++ b/docs/pages/guides/extending-a-world.mdx @@ -187,7 +187,7 @@ The easiest way to create the Solidity code is to use the MUD template: import { console } from "forge-std/console.sol"; import { IBaseWorld } from "@latticexyz/world-modules/src/interfaces/IBaseWorld.sol"; - import { WorldRegistrationSystem } from "@latticexyz/world/src/modules/core/implementations/WorldRegistrationSystem.sol"; + import { WorldRegistrationSystem } from "@latticexyz/world/src/modules/init/implementations/WorldRegistrationSystem.sol"; // Create resource identifiers (for the namespace and system) import { ResourceId } from "@latticexyz/store/src/ResourceId.sol"; @@ -253,10 +253,10 @@ The easiest way to create the Solidity code is to use the MUD template: Use [IBaseWorld.sol](https://github.com/latticexyz/mud/blob/main/packages/world-modules/src/interfaces/IBaseWorld.sol) to get definitions that are common to all `World` contracts. ```solidity - import { WorldRegistrationSystem } from "@latticexyz/world/src/modules/core/implementations/WorldRegistrationSystem.sol"; + import { WorldRegistrationSystem } from "@latticexyz/world/src/modules/init/implementations/WorldRegistrationSystem.sol"; ``` - [WorldRegistartionSystem.sol](https://github.com/latticexyz/mud/blob/main/packages/world/src/modules/core/implementations/WorldRegistrationSystem.sol) contains the function definitions necessary to register new namespaces and systems with an existing `World`. + [WorldRegistartionSystem.sol](https://github.com/latticexyz/mud/blob/main/packages/world/src/modules/init/implementations/WorldRegistrationSystem.sol) contains the function definitions necessary to register new namespaces and systems with an existing `World`. ```solidity // Create resource identifiers (for the namespace and system) @@ -352,7 +352,7 @@ The easiest way to create the Solidity code is to use the MUD template: world.registerNamespace(namespaceResource); ``` - [Register the namespace](https://github.com/latticexyz/mud/blob/main/packages/world/src/modules/core/implementations/WorldRegistrationSystem.sol#L39-L63). + [Register the namespace](https://github.com/latticexyz/mud/blob/main/packages/world/src/modules/init/implementations/WorldRegistrationSystem.sol#L39-L63). ```solidity StoreSwitch.setStoreAddress(worldAddress); @@ -404,7 +404,7 @@ The easiest way to create the Solidity code is to use the MUD template: cast send $WORLD_ADDRESS --rpc-url http://localhost:8545 --private-key $PRIVATE_KEY "messaging__incrementMessage(string)" "hello" ``` - When a function is _not_ in the root namespace, it is accessible as `__` (as long as it is [registered](https://github.com/latticexyz/mud/blob/main/packages/world/src/modules/core/implementations/WorldRegistrationSystem.sol#L164-L201)). + When a function is _not_ in the root namespace, it is accessible as `__` (as long as it is [registered](https://github.com/latticexyz/mud/blob/main/packages/world/src/modules/init/implementations/WorldRegistrationSystem.sol#L164-L201)). Here we call our `incrementMessage(string)` with the parameter `hello`.