Skip to content

Commit

Permalink
chore(docs): Apply contributing formating
Browse files Browse the repository at this point in the history
  • Loading branch information
ChampionAsh5357 committed Oct 14, 2024
1 parent 94bccc3 commit d1ea5a1
Show file tree
Hide file tree
Showing 53 changed files with 1,597 additions and 1,588 deletions.
4 changes: 2 additions & 2 deletions docs/advanced/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Advanced Topics",
"position": 12
"label": "Advanced Topics",
"position": 12
}
14 changes: 7 additions & 7 deletions docs/advanced/accesstransformers.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Access Transformers need to be declared in `build.gradle`. AT files can be speci
// In build.gradle:
// This block is where your mappings version is also specified
minecraft {
accessTransformers {
file('src/main/resources/META-INF/accesstransformer.cfg')
}
accessTransformers {
file('src/main/resources/META-INF/accesstransformer.cfg')
}
}
```

Expand All @@ -35,10 +35,10 @@ Additionally, multiple AT files can be specified and will be applied in order. T
```groovy
// In build.gradle:
minecraft {
accessTransformers {
file('src/main/resources/accesstransformer_main.cfg')
file('src/additions/resources/accesstransformer_additions.cfg')
}
accessTransformers {
file('src/main/resources/accesstransformer_main.cfg')
file('src/additions/resources/accesstransformer_additions.cfg')
}
}
```

Expand Down
6 changes: 3 additions & 3 deletions docs/advanced/extensibleenums.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ The parameters can be specified in three ways with limitations depending on the

- Inline in the JSON file as an array of constants (only allowed for primitive values, Strings and for passing null to any reference type)
- As a reference to a field of type `EnumProxy<TheEnum>` in a class from the mod (see `EnumProxy` example above)
- The first parameter specifies the target enum and the subsequent parameters are the ones to be passed to the enum constructor
- The first parameter specifies the target enum and the subsequent parameters are the ones to be passed to the enum constructor
- As a reference to a method returning `Object`, where the return value is the parameter value to use. The method must have exactly two parameters of type `int` (index of the parameter) and `Class<?>` (expected type of the parameter)
- The `Class<?>` object should be used to cast (`Class#cast()`) the return value in order to keep `ClassCastException`s in mod code.
- The `Class<?>` object should be used to cast (`Class#cast()`) the return value in order to keep `ClassCastException`s in mod code.

:::warning
The fields and/or methods used as sources for parameter values should be in a separate class to avoid unintentionally loading mod classes too early.
Expand All @@ -117,7 +117,7 @@ Further action is required depending on specific details about the enum:
- If the enum has an int ID parameter which should match the entry's ordinal, then the enum should be annotated with `@NumberedEnum` with the ID's parameter index as the annotation's value if it's not the first parameter
- If the enum has a String name parameter which is used for serialization and should therefore be namespaced, then the enum should be annotated with `@NamedEnum` with the name's parameter index as the annotation's value if it's not the first parameter
- If the enum is sent over the network, then it should be annotated with `@NetworkedEnum` with the annotation's parameter specifying in which direction the values may be sent (clientbound, serverbound or bidirectional)
- Warning: networked enums will require additional steps once network checks for enums are implemented in NeoForge
- Warning: networked enums will require additional steps once network checks for enums are implemented in NeoForge
- If the enum has constructors which are not usable by mods (i.e. because they require registry objects on an enum that may be initialized before modded registration runs), then they should be annotated with `@ReservedConstructor`

:::note
Expand Down
4 changes: 2 additions & 2 deletions docs/blockentities/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Block Entities",
"position": 6
"label": "Block Entities",
"position": 6
}
2 changes: 1 addition & 1 deletion docs/blockentities/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ When iterating over the inventory contents, it is recommended to iterate over `i
[block]: ../blocks/index.md
[blockentity]: index.md
[component]: ../resources/client/i18n.md#components
[datacomponent]: ../items/datacomponents.mdx
[datacomponent]: ../items/datacomponents.md
[item]: ../items/index.md
[itemstack]: ../items/index.md#itemstacks
[menu]: ../gui/menus.md
4 changes: 2 additions & 2 deletions docs/blocks/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Blocks",
"position": 3
"label": "Blocks",
"position": 3
}
4 changes: 2 additions & 2 deletions docs/concepts/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Concepts",
"position": 2
"label": "Concepts",
"position": 2
}
4 changes: 2 additions & 2 deletions docs/datastorage/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Data Storage",
"position": 8
"label": "Data Storage",
"position": 8
}
2 changes: 1 addition & 1 deletion docs/datastorage/attachments.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@ NeoForge.EVENT_BUS.register(PlayerEvent.Clone.class, event -> {
```

[saveddata]: ./saveddata.md
[datacomponents]: ../items/datacomponents.mdx
[datacomponents]: ../items/datacomponents.md
[network]: ../networking/index.md
2 changes: 1 addition & 1 deletion docs/datastorage/nbt.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,5 @@ NBT is used in a lot of places in Minecraft. Some of the most common examples in

[blockentity]: ../blockentities/index.md
[datapack]: ../resources/index.md#data
[datacomponents]: ../items/datacomponents.mdx
[datacomponents]: ../items/datacomponents.md
[nbtwiki]: https://minecraft.wiki/w/NBT_format
8 changes: 4 additions & 4 deletions docs/datastorage/saveddata.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ For example, if a SD was named "example" within the Nether, then a file would be
```java
// In some class
public ExampleSavedData create() {
return new ExampleSavedData();
return new ExampleSavedData();
}

public ExampleSavedData load(CompoundTag tag, HolderLookup.Provider lookupProvider) {
ExampleSavedData data = this.create();
// Load saved data
return data;
ExampleSavedData data = this.create();
// Load saved data
return data;
}

// In some method within the class
Expand Down
4 changes: 2 additions & 2 deletions docs/gettingstarted/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Getting Started",
"position": 1
"label": "Getting Started",
"position": 1
}
4 changes: 2 additions & 2 deletions docs/gui/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "GUIs",
"position": 9
"label": "GUIs",
"position": 9
}
Loading

0 comments on commit d1ea5a1

Please sign in to comment.