From aab495e9da09146e03c1d9577592401200589be1 Mon Sep 17 00:00:00 2001 From: Miroma <136986257+its-miroma@users.noreply.github.com> Date: Thu, 16 Jan 2025 00:14:36 +0100 Subject: [PATCH] fix spelling mistakes - fix `don't` - change `` and similar to `mod-id` or `mod_id` - fix #263 - add `processSidebarURLs: false` --- .vitepress/sidebars/develop.ts | 3 +++ .vitepress/sidebars/versioned/1.20.4.json | 3 +++ .vitepress/sidebars/versioned/1.21.json | 3 +++ .vitepress/transform.ts | 2 +- .vitepress/update.ts | 2 +- README.md | 3 ++- develop/blocks/blockstates.md | 8 ++++---- develop/blocks/first-block.md | 12 ++++++------ develop/data-generation/recipes.md | 2 +- develop/entities/damage-types.md | 2 +- develop/entities/effects.md | 2 +- develop/items/custom-armor.md | 10 +++++----- develop/items/custom-data-components.md | 4 ++-- develop/items/custom-item-groups.md | 2 +- develop/items/first-item.md | 14 +++++++------- develop/rendering/particles/creating-particles.md | 4 ++-- develop/sounds/custom.md | 6 +++--- 17 files changed, 46 insertions(+), 36 deletions(-) diff --git a/.vitepress/sidebars/develop.ts b/.vitepress/sidebars/develop.ts index fbe2f1525..4a50e1c65 100644 --- a/.vitepress/sidebars/develop.ts +++ b/.vitepress/sidebars/develop.ts @@ -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", }, diff --git a/.vitepress/sidebars/versioned/1.20.4.json b/.vitepress/sidebars/versioned/1.20.4.json index a49f2173e..609a3e875 100644 --- a/.vitepress/sidebars/versioned/1.20.4.json +++ b/.vitepress/sidebars/versioned/1.20.4.json @@ -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" } diff --git a/.vitepress/sidebars/versioned/1.21.json b/.vitepress/sidebars/versioned/1.21.json index 84418b803..337f41627 100644 --- a/.vitepress/sidebars/versioned/1.21.json +++ b/.vitepress/sidebars/versioned/1.21.json @@ -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" } diff --git a/.vitepress/transform.ts b/.vitepress/transform.ts index 46e4002c3..30deada64 100644 --- a/.vitepress/transform.ts +++ b/.vitepress/transform.ts @@ -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"]); } diff --git a/.vitepress/update.ts b/.vitepress/update.ts index 91cbcee91..fef78611d 100644 --- a/.vitepress/update.ts +++ b/.vitepress/update.ts @@ -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}` diff --git a/README.md b/README.md index e5ccd65f2..e66f66eaa 100644 --- a/README.md +++ b/README.md @@ -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. + +Please refer to the [contribution guidelines](./contributing.md) for more information. diff --git a/develop/blocks/blockstates.md b/develop/blocks/blockstates.md index cfdcc77ee..50da1d8d8 100644 --- a/develop/blocks/blockstates.md +++ b/develop/blocks/blockstates.md @@ -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//blockstates` folder. +Blockstate definitions are found in the `assets/mod-id/blockstates` folder. ## Example: Pillar Block {#pillar-block} @@ -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//textures/block` +As always, with all block textures, the texture files can be found in `assets/mod-id/textures/block` Textures @@ -45,7 +45,7 @@ An example of the `condensed_oak_log_horizontal.json` file: --- ::: info -Remember, blockstate files can be found in the `assets//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. ::: @@ -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! ::: --- diff --git a/develop/blocks/first-block.md b/develop/blocks/first-block.md index a7a4c8c33..f958c8454 100644 --- a/develop/blocks/first-block.md +++ b/develop/blocks/first-block.md @@ -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//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. @@ -94,15 +94,15 @@ You can either restart the game or build your mod and press F3+T ## Models and Textures {#models-and-textures} -All block textures can be found in the `assets//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. Texture -To make the texture show up in-game, you must create a block model which can be found in the `assets//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//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) @@ -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) @@ -132,7 +132,7 @@ Restarting the game, or reloading via F3+T 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//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. diff --git a/develop/data-generation/recipes.md b/develop/data-generation/recipes.md index 7409685d2..36271aab7 100644 --- a/develop/data-generation/recipes.md +++ b/develop/data-generation/recipes.md @@ -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} diff --git a/develop/entities/damage-types.md b/develop/entities/damage-types.md index 90dd926de..07a79225c 100644 --- a/develop/entities/damage-types.md +++ b/develop/entities/damage-types.md @@ -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.` 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 diff --git a/develop/entities/effects.md b/develop/entities/effects.md index 65e0cc898..52a259c12 100644 --- a/develop/entities/effects.md +++ b/develop/entities/effects.md @@ -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..": "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 diff --git a/develop/items/custom-armor.md b/develop/items/custom-armor.md index cef1b7d20..01c29ca93 100644 --- a/develop/items/custom-armor.md +++ b/develop/items/custom-armor.md @@ -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) @@ -100,8 +100,8 @@ There are two layers for the armor texture, both must be present. Previously, we created a `RegistryKey` 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//textures/entity/equipment/humanoid/guidite.png` - Contains upper body and boot textures. -- `assets//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. Guidite Armor Model Textures @@ -109,7 +109,7 @@ Previously, we created a `RegistryKey` constant called `GUIDITE_ 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//equipment/` folder. +Next, you'll need to create an associated equipment model definition. These go in the `/assets/mod-id/equipment/` folder. The `RegistryKey` constant we created earlier will determine the name of the JSON file. In this case, it'll be `guidite.json`. @@ -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) - \ No newline at end of file + diff --git a/develop/items/custom-data-components.md b/develop/items/custom-data-components.md index 13fcb5f21..d3d62c8af 100644 --- a/develop/items/custom-data-components.md +++ b/develop/items/custom-data-components.md @@ -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. @@ -82,7 +82,7 @@ public void appendTooltip(ItemStack stack, TooltipContext context, List to } ``` -Don't forget to update your lang file (`/assets//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 { diff --git a/develop/items/custom-item-groups.md b/develop/items/custom-item-groups.md index 6078dd0ec..8af2fee93 100644 --- a/develop/items/custom-item-groups.md +++ b/develop/items/custom-item-groups.md @@ -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) -
+--- 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. diff --git a/develop/items/first-item.md b/develop/items/first-item.md index 270c6a1d6..1da7af084 100644 --- a/develop/items/first-item.md +++ b/develop/items/first-item.md @@ -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//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 { @@ -87,7 +87,7 @@ You can either restart the game or build your mod and press F3+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//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` @@ -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//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) @@ -112,9 +112,9 @@ 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//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) @@ -122,7 +122,7 @@ Create the item description JSON in the `assets//items`, with the s - `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: `:item/` + - `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: @@ -144,7 +144,7 @@ Alternatively, if you want to make your item a fuel, you can use the `FuelRegist -If you want to add a crafting recipe for your item, you will need to place a recipe JSON file in the `data//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: diff --git a/develop/rendering/particles/creating-particles.md b/develop/rendering/particles/creating-particles.md index 0388cb2f5..2b1589759 100644 --- a/develop/rendering/particles/creating-particles.md +++ b/develop/rendering/particles/creating-particles.md @@ -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//` folder. +You will need to create 2 folders in your `resources/assets/mod-id/` folder. | Folder Path | Explanation | | -------------------- | ------------------------------------------------------------------------------------ | @@ -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 :sparkle_particle ~ ~1 ~ +/particle fabric-docs-reference:sparkle_particle ~ ~1 ~ ``` ![Showcase of the particle](/assets/develop/rendering/particles/sparkle-particle-showcase.png) diff --git a/develop/sounds/custom.md b/develop/sounds/custom.md index f09ee19e7..678bb5866 100644 --- a/develop/sounds/custom.md +++ b/develop/sounds/custom.md @@ -29,13 +29,13 @@ Also keep in mind that audio files can increase the file size of your mod drasti ## Loading the Audio File {#loading-the-audio-file} -Add the new `resources/assets//sounds` directory for the sounds in your mod, and put the exported audio file `metal_whistle.ogg` in there. +Add the new `resources/assets/mod-id/sounds` directory for the sounds in your mod, and put the exported audio file `metal_whistle.ogg` in there. -Continue with creating the `resources/assets//sounds.json` file if it doesn't exist yet and add your sound to the sound entries. +Continue with creating the `resources/assets/mod-id/sounds.json` file if it doesn't exist yet and add your sound to the sound entries. @[code lang=json](@/reference/latest/src/main/resources/assets/fabric-docs-reference/sounds.json) -The subtitle entry provides more context for the player. The subtitle name is used in the language files in the `resources/assets//lang` directory and will be displayed if the in-game subtitle setting is turned on and this custom sound is being played. +The subtitle entry provides more context for the player. The subtitle name is used in the language files in the `resources/assets/mod-id/lang` directory and will be displayed if the in-game subtitle setting is turned on and this custom sound is being played. ## Registering the Custom Sound {#registering-the-custom-sound}