From bf2498f82222c1056f7afedba9d59dd0632f7fc4 Mon Sep 17 00:00:00 2001 From: C4 <29991504+TheIllusiveC4@users.noreply.github.com> Date: Sun, 7 Apr 2024 00:21:31 -0700 Subject: [PATCH] Refactor Curios docs for better presentation --- docs/curios/api/_category_.json | 8 ++++++++ .../APIs => api}/renderer-interface.md | 0 docs/curios/commands.md | 2 +- .../{Developing with Curios => }/getting-started.md | 0 docs/curios/items/_category_.json | 8 ++++++++ .../{Developing with Curios => items}/curio-creation.mdx | 0 docs/curios/{ => items}/curios-nbt.md | 0 .../rendering-registry.md | 4 +--- docs/curios/slots/_category_.json | 8 ++++++++ .../{Developing with Curios => slots}/data-generation.md | 6 +++--- docs/curios/{ => slots}/datapack-example.md | 4 ++-- docs/curios/{ => slots}/entity-register.md | 6 +++--- docs/curios/{ => slots}/preset-slots.md | 6 +++--- .../{Developing with Curios => slots}/slot-modifiers.mdx | 2 +- docs/curios/{ => slots}/slot-register.md | 4 ++-- docs/curios/{ => slots}/slot-textures.md | 4 ++-- 16 files changed, 42 insertions(+), 20 deletions(-) create mode 100644 docs/curios/api/_category_.json rename docs/curios/{Developing with Curios/APIs => api}/renderer-interface.md (100%) rename docs/curios/{Developing with Curios => }/getting-started.md (100%) create mode 100644 docs/curios/items/_category_.json rename docs/curios/{Developing with Curios => items}/curio-creation.mdx (100%) rename docs/curios/{ => items}/curios-nbt.md (100%) rename docs/curios/{Developing with Curios => items}/rendering-registry.md (96%) create mode 100644 docs/curios/slots/_category_.json rename docs/curios/{Developing with Curios => slots}/data-generation.md (98%) rename docs/curios/{ => slots}/datapack-example.md (97%) rename docs/curios/{ => slots}/entity-register.md (87%) rename docs/curios/{ => slots}/preset-slots.md (96%) rename docs/curios/{Developing with Curios => slots}/slot-modifiers.mdx (99%) rename docs/curios/{ => slots}/slot-register.md (98%) rename docs/curios/{ => slots}/slot-textures.md (97%) diff --git a/docs/curios/api/_category_.json b/docs/curios/api/_category_.json new file mode 100644 index 0000000..53db1d6 --- /dev/null +++ b/docs/curios/api/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "API", + "position": 4, + "link": { + "type": "generated-index", + "description": "All about curio slots and how to manage them." + } +} diff --git a/docs/curios/Developing with Curios/APIs/renderer-interface.md b/docs/curios/api/renderer-interface.md similarity index 100% rename from docs/curios/Developing with Curios/APIs/renderer-interface.md rename to docs/curios/api/renderer-interface.md diff --git a/docs/curios/commands.md b/docs/curios/commands.md index a857c5d..1bbc301 100644 --- a/docs/curios/commands.md +++ b/docs/curios/commands.md @@ -49,7 +49,7 @@ All the commands begin with `curios` and have the following options: * Specifies the index within the slot type. * Must be a whole number greater than or equal to 0. -* ``: [slot_identifier](slot-register) +* ``: [slot_identifier](slots/slot-register.md) * Specifies a slot type. * Must be an identifier of a registered slot type. diff --git a/docs/curios/Developing with Curios/getting-started.md b/docs/curios/getting-started.md similarity index 100% rename from docs/curios/Developing with Curios/getting-started.md rename to docs/curios/getting-started.md diff --git a/docs/curios/items/_category_.json b/docs/curios/items/_category_.json new file mode 100644 index 0000000..d42200b --- /dev/null +++ b/docs/curios/items/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Items", + "position": 2, + "link": { + "type": "generated-index", + "description": "All about curio slots and how to manage them." + } +} diff --git a/docs/curios/Developing with Curios/curio-creation.mdx b/docs/curios/items/curio-creation.mdx similarity index 100% rename from docs/curios/Developing with Curios/curio-creation.mdx rename to docs/curios/items/curio-creation.mdx diff --git a/docs/curios/curios-nbt.md b/docs/curios/items/curios-nbt.md similarity index 100% rename from docs/curios/curios-nbt.md rename to docs/curios/items/curios-nbt.md diff --git a/docs/curios/Developing with Curios/rendering-registry.md b/docs/curios/items/rendering-registry.md similarity index 96% rename from docs/curios/Developing with Curios/rendering-registry.md rename to docs/curios/items/rendering-registry.md index 717da68..32cb08f 100644 --- a/docs/curios/Developing with Curios/rendering-registry.md +++ b/docs/curios/items/rendering-registry.md @@ -12,9 +12,8 @@ In the `top.theillusivec4.curios.api.client` package, you'll find an interface c needs to be implemented on an object of your choice, as its `render` method is what will be called to run your rendering code later. -For the full guide on the interface, see [here](APIs/renderer-interface.md). +For the full guide on the interface, see [here](../api/renderer-interface.md). -### Example ```java public class MyCurioRenderer implements ICurioRenderer { @@ -41,7 +40,6 @@ Once you have an implementation of `ICurioRenderer`, you need to register an ins by calling the `register` method in `top.theillusivec4.curios.api.client.CuriosRendererRegistry` during the `FMLClientSetupEvent` in mod loading. -### Example ```java @Mod("CurioMod") public class CurioMod { diff --git a/docs/curios/slots/_category_.json b/docs/curios/slots/_category_.json new file mode 100644 index 0000000..cb28f06 --- /dev/null +++ b/docs/curios/slots/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Slots", + "position": 1, + "link": { + "type": "generated-index", + "description": "All about curio slots and how to manage them." + } +} diff --git a/docs/curios/Developing with Curios/data-generation.md b/docs/curios/slots/data-generation.md similarity index 98% rename from docs/curios/Developing with Curios/data-generation.md rename to docs/curios/slots/data-generation.md index 2558eac..4edbad8 100644 --- a/docs/curios/Developing with Curios/data-generation.md +++ b/docs/curios/slots/data-generation.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 13 --- # Data Generation @@ -67,7 +67,7 @@ public void generate(HolderLookup.Provider registries, ExistingFileHelper fileHe Additional parameters can be added by calling methods on the `ISlotData` returned by the `createSlot` method call. Most of these parameters are linked to fields for `ISlotType`, more information on how these fields are constructed and what -they represent can be found on the page for [slot registration](../slot-register.md#-syntax). +they represent can be found on the page for [slot registration](slot-register.md#-syntax). | Method | Parameters | Field | |----------------|--------------------|------------------| @@ -111,7 +111,7 @@ public void generate(HolderLookup.Provider registries, ExistingFileHelper fileHe ``` Additional parameters can be added by calling methods on the `IEntitiesData` returned by the `createEntities` method call. All of these parameters correspond to JSON fields, more information on these can be found on the page for -[entity registration](../entity-register.md#-syntax). +[entity registration](entity-register.md#-syntax). | Method | Parameters | Field | Notes | |----------------|-------------------|--------------|------------------------------------------------------------| diff --git a/docs/curios/datapack-example.md b/docs/curios/slots/datapack-example.md similarity index 97% rename from docs/curios/datapack-example.md rename to docs/curios/slots/datapack-example.md index 84fb8a8..0e05cf0 100644 --- a/docs/curios/datapack-example.md +++ b/docs/curios/slots/datapack-example.md @@ -1,5 +1,5 @@ --- -sidebar_position: 11 +sidebar_position: 17 --- # Example Datapack @@ -9,7 +9,7 @@ existing slot types. ## Getting Started -First, download the [example datapack](../assets/curios_example.zip). +First, download the [example datapack](../../assets/curios_example.zip). Unzip the file and there will be the following folder structure: diff --git a/docs/curios/entity-register.md b/docs/curios/slots/entity-register.md similarity index 87% rename from docs/curios/entity-register.md rename to docs/curios/slots/entity-register.md index 4d14d4e..35bb1b1 100644 --- a/docs/curios/entity-register.md +++ b/docs/curios/slots/entity-register.md @@ -2,7 +2,7 @@ sidebar_position: 3 --- -# Adding Slot Types to Entities +# Entity Slot Types A tutorial on how to add registered slot types to entities. @@ -12,7 +12,7 @@ Beginning in 1.20, the recommended way to add a registered slot type to an entit unfamiliar with datapacks, it is recommended to read through the [wiki page](https://minecraft.fandom.com/wiki/Data_pack) in order to understand the concept and structure before proceeding to the rest of this page. -[Registered slot types](./slot-register.md) will all be available for use but will not appear in-game until they are +[Registered slot types](slot-register.md) will all be available for use but will not appear in-game until they are added to one or more entities. ## Directory @@ -45,7 +45,7 @@ All the listed slots will be associated to all the listed entities. :::caution Adding multiple of the same `identifier` to the `slots` array will **not** add multiple slots. Each entry in the `slots` -array represents a [registered slot type](./slot-register.md) and the entries do not stack, please refer to that page in +array represents a [registered slot type](slot-register.md) and the entries do not stack, please refer to that page in order to change slot type behavior including default size. ::: diff --git a/docs/curios/preset-slots.md b/docs/curios/slots/preset-slots.md similarity index 96% rename from docs/curios/preset-slots.md rename to docs/curios/slots/preset-slots.md index 8da5e59..69a11e4 100644 --- a/docs/curios/preset-slots.md +++ b/docs/curios/slots/preset-slots.md @@ -1,5 +1,5 @@ --- -sidebar_position: 10 +sidebar_position: 5 --- # Preset Slot Types @@ -15,8 +15,8 @@ list of slot types that are commonly used in the modded community and should be types when applicable. :::note -Although these slot types are provided by Curios, they are not active by default. A developer or user will still need to -take the proper steps to register the slot type(s) that they want in order to add them to the game. +Although these slot types are provided by Curios, they are not added to any entities by default. This needs to be done +by the developer or user by [adding slot types to entities](entity-register.md). ::: ## Slot Types diff --git a/docs/curios/Developing with Curios/slot-modifiers.mdx b/docs/curios/slots/slot-modifiers.mdx similarity index 99% rename from docs/curios/Developing with Curios/slot-modifiers.mdx rename to docs/curios/slots/slot-modifiers.mdx index a528994..7ed755e 100644 --- a/docs/curios/Developing with Curios/slot-modifiers.mdx +++ b/docs/curios/slots/slot-modifiers.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 3 +sidebar_position: 11 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; diff --git a/docs/curios/slot-register.md b/docs/curios/slots/slot-register.md similarity index 98% rename from docs/curios/slot-register.md rename to docs/curios/slots/slot-register.md index 516d3dd..a3c181e 100644 --- a/docs/curios/slot-register.md +++ b/docs/curios/slots/slot-register.md @@ -2,7 +2,7 @@ sidebar_position: 1 --- -# Registering and Editing Slot Types +# Slot Types A tutorial on how to register and modify slot types that are recognized by Curios. @@ -19,7 +19,7 @@ needed datapack registration. **Why are my registered slot types not appearing?** Registering slot types makes them available for use; however, they are _not_ added to any entities (including players) -by default. In order to add them to an entity, please refer to [the next step](./entity-register.md) on adding slot +by default. In order to add them to an entity, please refer to [the next step](entity-register.md) on adding slot types to entities. ::: diff --git a/docs/curios/slot-textures.md b/docs/curios/slots/slot-textures.md similarity index 97% rename from docs/curios/slot-textures.md rename to docs/curios/slots/slot-textures.md index 0020633..0aa4878 100644 --- a/docs/curios/slot-textures.md +++ b/docs/curios/slots/slot-textures.md @@ -1,8 +1,8 @@ --- -sidebar_position: 5 +sidebar_position: 9 --- -# Adding Custom Slot Textures +# Slot Icon Textures A tutorial on how to add custom slot textures to slot types.