Skip to content

Commit

Permalink
Refactor Curios docs for better presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
TheIllusiveC4 committed Apr 7, 2024
1 parent 54c99b6 commit bf2498f
Show file tree
Hide file tree
Showing 16 changed files with 42 additions and 20 deletions.
8 changes: 8 additions & 0 deletions docs/curios/api/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "API",
"position": 4,
"link": {
"type": "generated-index",
"description": "All about curio slots and how to manage them."
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/curios/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

* `<slotId>`: [slot_identifier](slot-register)
* `<slotId>`: [slot_identifier](slots/slot-register.md)
* Specifies a slot type.
* Must be an identifier of a registered slot type.

Expand Down
File renamed without changes.
8 changes: 8 additions & 0 deletions docs/curios/items/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Items",
"position": 2,
"link": {
"type": "generated-index",
"description": "All about curio slots and how to manage them."
}
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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 {
Expand Down
8 changes: 8 additions & 0 deletions docs/curios/slots/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Slots",
"position": 1,
"link": {
"type": "generated-index",
"description": "All about curio slots and how to manage them."
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 13
---

# Data Generation
Expand Down Expand Up @@ -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 |
|----------------|--------------------|------------------|
Expand Down Expand Up @@ -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 |
|----------------|-------------------|--------------|------------------------------------------------------------|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 11
sidebar_position: 17
---

# Example Datapack
Expand All @@ -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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
Expand Down Expand Up @@ -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.
:::

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 10
sidebar_position: 5
---

# Preset Slot Types
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 11
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.
:::

Expand Down
Original file line number Diff line number Diff line change
@@ -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.

Expand Down

0 comments on commit bf2498f

Please sign in to comment.