Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix spelling mistakes #264

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vitepress/sidebars/develop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@ export default [
items: [
{
text: "Fabric API GitHub",
processSidebarURLs: false,
translatable: false,
link: "https://github.com/FabricMC/fabric",
},
{
text: "Yarn GitHub",
processSidebarURLs: false,
translatable: false,
link: "https://github.com/FabricMC/yarn",
},
{
text: "Loom GitHub",
processSidebarURLs: false,
translatable: false,
link: "https://github.com/FabricMC/fabric-loom",
},
Expand Down
3 changes: 3 additions & 0 deletions .vitepress/sidebars/versioned/1.20.4.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,19 @@
"items": [
{
"text": "Fabric API GitHub",
"processSidebarURLs": false,
"translatable": false,
"link": "https://github.com/FabricMC/fabric"
},
{
"text": "Yarn GitHub",
"processSidebarURLs": false,
"translatable": false,
"link": "https://github.com/FabricMC/yarn"
},
{
"text": "Loom GitHub",
"processSidebarURLs": false,
"translatable": false,
"link": "https://github.com/FabricMC/fabric-loom"
}
Expand Down
3 changes: 3 additions & 0 deletions .vitepress/sidebars/versioned/1.21.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,19 @@
"items": [
{
"text": "Fabric API GitHub",
"processSidebarURLs": false,
"translatable": false,
"link": "https://github.com/FabricMC/fabric"
},
{
"text": "Yarn GitHub",
"processSidebarURLs": false,
"translatable": false,
"link": "https://github.com/FabricMC/yarn"
},
{
"text": "Loom GitHub",
"processSidebarURLs": false,
"translatable": false,
"link": "https://github.com/FabricMC/fabric-loom"
}
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function transformPageData(pageData: PageData, _context: any) {
// TODO: "twitter:site"?
];

// Dont index the page if it's a versioned page.
// Don't index the page if it's a versioned page.
if (pageData.filePath.includes("versions")) {
tags.push(["robots", "noindex"]);
}
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ import players from "./sidebars/players";
for (const file of versionedMarkdownFiles) {
const content = fs.readFileSync(file, "utf-8");

// Replace all instances of @/reference/latest/ with @/reference/oldVersion/
// Replace all instances of /reference/latest with /reference/oldVersion
const newContent = content.replace(
/\/reference\/latest/g,
`/reference/${oldVersion}`
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ This repository contains the source code for the Fabric Documentation website, w

## Contributing

Please refer to the [contribution guidelines](./contributing) for more information.
<!-- markdownlint-disable-next-line search-replace -->
Please refer to the [contribution guidelines](./contributing.md) for more information.
8 changes: 4 additions & 4 deletions develop/blocks/blockstates.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A block state is a piece of data attached to a singular block in the Minecraft w

You can probably see why they are useful - they avoid the need to store NBT data in a block entity - reducing the world size, and preventing TPS issues!

Blockstate definitions are found in the `assets/<mod id here>/blockstates` folder.
Blockstate definitions are found in the `assets/mod-id/blockstates` folder.

## Example: Pillar Block {#pillar-block}

Expand All @@ -29,7 +29,7 @@ The vanilla `PillarBlock` class allows the block to be placed in the X, Y or Z a

Pillar blocks have two textures, top and side - they use the `block/cube_column` model.

As always, with all block textures, the texture files can be found in `assets/<mod id here>/textures/block`
As always, with all block textures, the texture files can be found in `assets/mod-id/textures/block`

<DownloadEntry visualURL="/assets/develop/blocks/blockstates_0_large.png" downloadURL="/assets/develop/blocks/condensed_oak_log_textures.zip">Textures</DownloadEntry>

Expand All @@ -45,7 +45,7 @@ An example of the `condensed_oak_log_horizontal.json` file:
---

::: info
Remember, blockstate files can be found in the `assets/<mod id here>/blockstates` folder, the name of the blockstate file should match the block ID used when registering your block in the `ModBlocks` class. For instance, if the block ID is `condensed_oak_log`, the file should be named `condensed_oak_log.json`.
Remember, blockstate files can be found in the `assets/mod-id/blockstates` folder, the name of the blockstate file should match the block ID used when registering your block in the `ModBlocks` class. For instance, if the block ID is `condensed_oak_log`, the file should be named `condensed_oak_log.json`.

For a more in-depth look at all the modifiers available in the blockstate files, check out the [Minecraft Wiki - Models (Block States)](https://minecraft.wiki/w/Tutorials/Models#Block_states) page.
:::
Expand Down Expand Up @@ -105,7 +105,7 @@ Since this block only has two possible variants, as it only has one property (`a
@[code](@/reference/latest/src/main/resources/assets/fabric-docs-reference/blockstates/prismarine_lamp.json)

::: tip
Dont forget to add an [Item Model Description](../items/first-item#creating-the-item-model-description) for the block so that it will show in the inventory!
Don't forget to add an [Item Model Description](../items/first-item#creating-the-item-model-description) for the block so that it will show in the inventory!
:::

---
Expand Down
12 changes: 6 additions & 6 deletions develop/blocks/first-block.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ There are a few issues though - the block item is not named, and the block has n

## Adding Block Translations {#adding-block-translations}

To add a translation, you must create a translation key in your translation file - `assets/<mod id here>/lang/en_us.json`.
To add a translation, you must create a translation key in your translation file - `assets/mod-id/lang/en_us.json`.

Minecraft will use this translation in the creative inventory and other places where the block name is displayed, such as command feedback.

Expand All @@ -94,15 +94,15 @@ You can either restart the game or build your mod and press <kbd>F3</kbd>+<kbd>T

## Models and Textures {#models-and-textures}

All block textures can be found in the `assets/<mod id here>/textures/block` folder - an example texture for the "Condensed Dirt" block is free to use.
All block textures can be found in the `assets/mod-id/textures/block` folder - an example texture for the "Condensed Dirt" block is free to use.

<DownloadEntry visualURL="/assets/develop/blocks/first_block_1.png" downloadURL="/assets/develop/blocks/first_block_1_small.png">Texture</DownloadEntry>

To make the texture show up in-game, you must create a block model which can be found in the `assets/<mod id here>/models/block/condensed_dirt.json` file for the "Condensed Dirt" block. For this block, we're going to use the `block/cube_all` model type.
To make the texture show up in-game, you must create a block model which can be found in the `assets/mod-id/models/block/condensed_dirt.json` file for the "Condensed Dirt" block. For this block, we're going to use the `block/cube_all` model type.

@[code](@/reference/latest/src/main/generated/assets/fabric-docs-reference/models/block/condensed_dirt.json)

For the block to show in your inventory, you will need to create an [Item Model Description](../items/first-item#creating-the-item-model-description) that points to your block model. For this example, the item model description for the "Condensed Dirt" block can be found at `assets/<mod id here>/items/condensed_dirt.json`.
For the block to show in your inventory, you will need to create an [Item Model Description](../items/first-item#creating-the-item-model-description) that points to your block model. For this example, the item model description for the "Condensed Dirt" block can be found at `assets/mod-id/items/condensed_dirt.json`.

@[code](@/reference/latest/src/main/generated/assets/fabric-docs-reference/items/condensed_dirt.json)

Expand All @@ -118,7 +118,7 @@ The blockstate definition is used to instruct the game on which model to render

For the example block, which doesn't have a complex blockstate, only one entry is needed in the definition.

This file should be located in the `assets/mod_id/blockstates` folder, and its name should match the block ID used when registering your block in the `ModBlocks` class. For instance, if the block ID is `condensed_dirt`, the file should be named `condensed_dirt.json`.
This file should be located in the `assets/mod-id/blockstates` folder, and its name should match the block ID used when registering your block in the `ModBlocks` class. For instance, if the block ID is `condensed_dirt`, the file should be named `condensed_dirt.json`.

@[code](@/reference/latest/src/main/generated/assets/fabric-docs-reference/blockstates/condensed_dirt.json)

Expand All @@ -132,7 +132,7 @@ Restarting the game, or reloading via <kbd>F3</kbd>+<kbd>T</kbd> to apply change

## Adding Block Drops {#adding-block-drops}

When breaking the block in survival, you may see that the block does not drop - you might want this functionality, however to make your block drop as an item on break you must implement its loot table - the loot table file should be placed in the `data/<mod id here>/loot_table/blocks/` folder.
When breaking the block in survival, you may see that the block does not drop - you might want this functionality, however to make your block drop as an item on break you must implement its loot table - the loot table file should be placed in the `data/mod-id/loot_table/blocks/` folder.

::: info
For a greater understanding of loot tables, you can refer to the [Minecraft Wiki - Loot Tables](https://minecraft.wiki/w/Loot_table) page.
Expand Down
2 changes: 1 addition & 1 deletion develop/data-generation/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ First, we'll need our provider. Make a class that `extends FabricRecipeProvider`

To finish setup, add this provider to your `DataGeneratorEntrypoint` within the `onInitializeDataGenerator` method.

@[code lang=java transclude={30-30}](@/reference/latest/src/client/java/com/example/docs/datagen/FabricDocsReferenceDataGenerator.java)
@[code lang=java transclude={31-31}](@/reference/latest/src/client/java/com/example/docs/datagen/FabricDocsReferenceDataGenerator.java)

## Shapeless Recipes {#shapeless-recipes}

Expand Down
2 changes: 1 addition & 1 deletion develop/entities/damage-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Now whenever a living entity steps on our custom block, it'll take 5 damage (2.5

### Custom Death Message {#custom-death-message}

You can define a death message for the damage type in the format of `death.attack.<message_id>` in our
You can define a death message for the damage type in the format of `death.attack.message_id` in our
mod's `en_us.json` file.

```json
Expand Down
2 changes: 1 addition & 1 deletion develop/entities/effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ resources/assets/fabric-docs-reference/textures/mob_effect/tater.png

### Translations {#translations}

Like any other translation, you can add an entry with ID format `"effect.<mod-id>.<effect-identifier>": "Value"` to the
Like any other translation, you can add an entry with ID format `"effect.mod-id.effect-identifier": "Value"` to the
language file.

```json
Expand Down
10 changes: 5 additions & 5 deletions develop/items/custom-armor.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If you're struggling to determine a balanced base durability, you can refer to t

### Equipment Asset Registry Key {#equipment-asset-registry-key}

Whilst we dont have to register our `ArmorMaterial` to any registries, the game will use this to find the relevant textures for our armor, it's generally good practice to store any registry keys as constants.
Even though we don't have to register our `ArmorMaterial` to any registries, it's generally good practice to store any registry keys as constants, as the game will use this to find the relevant textures for our armor.

@[code transcludeWith=:::material_key](@/reference/latest/src/main/java/com/example/docs/item/armor/GuiditeArmorMaterial.java)

Expand Down Expand Up @@ -100,16 +100,16 @@ There are two layers for the armor texture, both must be present.

Previously, we created a `RegistryKey<EquipmentAsset>` constant called `GUIDITE_ARMOR_MATERIAL_KEY` which we passed into our `ArmorMaterial` constructor. It's recommended to name the texture similarly, so in our case, `guidite.png`

- `assets/<mod_id>/textures/entity/equipment/humanoid/guidite.png` - Contains upper body and boot textures.
- `assets/<mod_id>/textures/entity/equipment/humanoid_leggings/guidite.png` - Contains legging textures.
- `assets/mod-id/textures/entity/equipment/humanoid/guidite.png` - Contains upper body and boot textures.
- `assets/mod-id/textures/entity/equipment/humanoid_leggings/guidite.png` - Contains legging textures.

<DownloadEntry downloadURL="/assets/develop/items/example_armor_layer_textures.zip">Guidite Armor Model Textures</DownloadEntry>

::: tip
If you're updating to 1.21.4 from an older version of the game, the `humanoid` folder is where your `layer0.png` armor texture goes, and the `humanoid_leggings` folder is where your `layer1.png` armor texture goes.
:::

Next, you'll need to create an associated equipment model definition. These go in the `/assets/<mod_id>/equipment/` folder.
Next, you'll need to create an associated equipment model definition. These go in the `/assets/mod-id/equipment/` folder.

The `RegistryKey<EquipmentAsset>` constant we created earlier will determine the name of the JSON file. In this case, it'll be `guidite.json`.

Expand All @@ -121,4 +121,4 @@ With the textures and equipment model definition present, you should be able to

![Working armor model on player](/assets/develop/items/armor_3.png)

<!-- TODO: A guide on creating equipment for dyeable armor could prove useful. -->
<!-- TODO: A guide on creating equipment for dyeable armor could prove useful. -->
4 changes: 2 additions & 2 deletions develop/items/custom-data-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static final ComponentType<?> MY_COMPONENT_TYPE = Registry.register(

There are a few things here worth noting. On the first and fourth lines, you can see a `?`. This will be replaced with the type of your component's value. We'll fill this in soon.

Secondly, you must provide an `Identifier` containing the intended ID of your component. This is namespaced with your mod's mod ID.
Secondly, you must provide an `Identifier` containing the intended ID of your component. This is namespaced with your mod's ID.

Lastly, we have a `ComponentType.Builder` that creates the actual `ComponentType` instance that's being registered. This contains another crucial detail we will need to discuss: your component's `Codec`. This is currently `null` but we will also fill it in soon.

Expand Down Expand Up @@ -82,7 +82,7 @@ public void appendTooltip(ItemStack stack, TooltipContext context, List<Text> to
}
```

Don't forget to update your lang file (`/assets/<mod id>/lang/en_us.json`) and add these two lines:
Don't forget to update your lang file (`/assets/mod-id/lang/en_us.json`) and add these two lines:

```json
{
Expand Down
2 changes: 1 addition & 1 deletion develop/items/custom-item-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ It's surprisingly easy to create an item group. Simply create a new static final

@[code transcludeWith=:::_12](@/reference/latest/src/main/java/com/example/docs/item/ModItems.java)

<hr />
---

You should see the item group is now in the creative inventory menu. However, it is untranslated - you must add a translation key to your translations file - similarly to how you translated your first item.

Expand Down
14 changes: 7 additions & 7 deletions develop/items/first-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ However, it's missing the following:

The item currently doesn't have a translation, so you will need to add one. The translation key has already been provided by Minecraft: `item.mod_id.suspicious_substance`.

Create a new JSON file at: `src/main/resources/assets/<mod id here>/lang/en_us.json` and put in the translation key, and its value:
Create a new JSON file at: `src/main/resources/assets/mod-id/lang/en_us.json` and put in the translation key, and its value:

```json
{
Expand All @@ -87,7 +87,7 @@ You can either restart the game or build your mod and press <kbd>F3</kbd>+<kbd>T

## Adding a Texture and Model {#adding-a-texture-and-model}

To give your item a texture and model, simply create a 16x16 texture image for your item and save it in the `assets/<mod id here>/textures/item` folder. Name the texture file the same as the item's identifier, but with a `.png` extension.
To give your item a texture and model, simply create a 16x16 texture image for your item and save it in the `assets/mod-id/textures/item` folder. Name the texture file the same as the item's identifier, but with a `.png` extension.

For example purposes, you can use this example texture for `suspicious_substance.png`

Expand All @@ -97,7 +97,7 @@ When restarting/reloading the game - you should see that the item still has no t

You're going to create a simple `item/generated` model, which takes in an input texture and nothing else.

Create the model JSON in the `assets/<mod id here>/models/item` folder, with the same name as the item; `suspicious_substance.json`
Create the model JSON in the `assets/mod-id/models/item` folder, with the same name as the item; `suspicious_substance.json`

@[code](@/reference/latest/src/main/generated/assets/fabric-docs-reference/models/item/suspicious_substance.json)

Expand All @@ -112,17 +112,17 @@ There are alternatives, such as `item/handheld` which is used for items that are

## Creating the Item Model Description {#creating-the-item-model-description}

Minecraft doesn't automatically know where your item's model files can be found, we need to provide an item model description.
Minecraft doesn't automatically know where your items' model files can be found, we need to provide an item model description.

Create the item description JSON in the `assets/<mod id here>/items`, with the same filename as the identifier of the item; `suspicious_substance.json`.
Create the item description JSON in the `assets/mod-id/items`, with the same file name as the identifier of the item: `suspicious_substance.json`.

@[code](@/reference/latest/src/main/generated/assets/fabric-docs-reference/items/suspicious_substance.json)

### Breaking Down the Item Model Description JSON {#breaking-down-the-item-model-description-json}

- `model`: This is the property that contains the reference to our model.
- `type`: This is the type of our model. For most items, this should be `minecraft:model`
- `model`: This is the model's identifier. It should have this form: `<mod id here>:item/<item name here>`
- `model`: This is the model's identifier. It should have this form: `mod-id:item/item_name`

Your item should now look like this in-game:

Expand All @@ -144,7 +144,7 @@ Alternatively, if you want to make your item a fuel, you can use the `FuelRegist

<!-- In the future, an entire section on recipes and recipe types should be created. For now, this suffices. -->

If you want to add a crafting recipe for your item, you will need to place a recipe JSON file in the `data/<mod id here>/recipe` folder.
If you want to add a crafting recipe for your item, you will need to place a recipe JSON file in the `data/mod-id/recipe` folder.

For more information on the recipe format, check out these resources:

Expand Down
4 changes: 2 additions & 2 deletions develop/rendering/particles/creating-particles.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can see all the particle factories by looking at all the implementations of

## Creating a JSON File and Adding Textures {#creating-a-json-file-and-adding-textures}

You will need to create 2 folders in your `resources/assets/<mod id here>/` folder.
You will need to create 2 folders in your `resources/assets/mod-id/` folder.

| Folder Path | Explanation |
| -------------------- | ------------------------------------------------------------------------------------ |
Expand All @@ -60,7 +60,7 @@ Once you have completed the JSON file and saved your work, you are good to load
You can see if everything has worked by typing the following command:

```mcfunction
/particle <mod id here>:sparkle_particle ~ ~1 ~
/particle fabric-docs-reference:sparkle_particle ~ ~1 ~
```

![Showcase of the particle](/assets/develop/rendering/particles/sparkle-particle-showcase.png)
Expand Down
Loading