diff --git a/mods/src/api/README.md b/mods/src/api/README.md index 5d4821dc..25e410dd 100644 --- a/mods/src/api/README.md +++ b/mods/src/api/README.md @@ -1,6 +1,6 @@ # `api` Mod -This mod implements all of the RaspberryJuice extensions to the MCPI API, for the modding API, see [../misc/api.cpp](). +This mod implements all of the RaspberryJuice extensions to the MCPI API, for the modding API, see [misc/api.cpp](../misc/api.cpp). This includes: - [x] `world.getBlocks(x0: int, y0: int, z0: int, x1: int, y1: int, z1: int) -> int[]` @@ -65,11 +65,11 @@ This includes: - - Sets a block of `id:data` at the specified point, if the block is a sign, it will attempt to set lines 1 through 4 of the sign to the given text - - For the API, the lines must be below 100 characters, however when loading signs MCPI will cap it at 16 characters (this can be disabled by patching out the call at `0xd1e2c`). - - The lines are optional -- - The wiki has a list of blocks: [https://mcpirevival.miraheze.org/wiki/Minecraft:_Pi_Edition_Complete_Block_List], sign is 63 and wall sign is 68 +- - The wiki has a list of blocks: https://mcpirevival.miraheze.org/wiki/Minecraft:_Pi_Edition_Complete_Block_List, sign is 63 and wall sign is 68 - [x] `world.spawnEntity(x: int, y: int, z: int, type: int) -> int` - - Spawns an entity of `type` at the given position - - Entities with a type of 0 cannot be spawned -- - The list of entity types can be found by running the command below, or on the wiki: [https://mcpirevival.miraheze.org/wiki/Minecraft:_Pi_Edition_Complete_Entity_List] +- - The list of entity types can be found by running the command below, or on the wiki: https://mcpirevival.miraheze.org/wiki/Minecraft:_Pi_Edition_Complete_Entity_List - [x] `world.getEntityTypes() -> {type: int, name: str}` - - Returns a list of known entity types, if there are modded entities this list may be incorrect @@ -86,3 +86,7 @@ Egdecases: - `entity.getName` will not get the name of non-player entities with a type id of 0 due to ambiguity. - All Raspberry Juice commands/responses involving the player name are designed around the MCJE username restrictions, not the much looser MCPI restrictions. They may cause problems. + +## How does it work? + +![Reborn-API.png](Reborn-API.png) diff --git a/mods/src/api/Reborn-API.drawio b/mods/src/api/Reborn-API.drawio new file mode 100644 index 00000000..df761783 --- /dev/null +++ b/mods/src/api/Reborn-API.drawio @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mods/src/api/Reborn-API.png b/mods/src/api/Reborn-API.png new file mode 100644 index 00000000..4848bb30 Binary files /dev/null and b/mods/src/api/Reborn-API.png differ