diff --git a/develop/items/custom-armor.md b/develop/items/custom-armor.md index 2007af912..2673c98dd 100644 --- a/develop/items/custom-armor.md +++ b/develop/items/custom-armor.md @@ -27,7 +27,7 @@ You'll need to create a class that inherits `ArmorMaterial` - and add the follow The following methods will have to be implemented as well - these methods tell the game vital information on your armor items: -- #### Durability - `getDurability(ArmorItem.Type type)` +- ### Durability - `getDurability(ArmorItem.Type type)` Returns the durability for a specific armor type - in hit points. @@ -55,8 +55,6 @@ The following methods will have to be implemented as well - these methods tell t @[code transcludeWith=:::4](@/reference/latest/src/main/java/com/example/docs/item/armor/GuiditeArmorMaterial.java) - - - #### Equip Sound - `getEquipsound()` What sound should be played when the armor is equipped? @@ -65,7 +63,6 @@ The following methods will have to be implemented as well - these methods tell t @[code transcludeWith=:::5](@/reference/latest/src/main/java/com/example/docs/item/armor/GuiditeArmorMaterial.java) - - #### Repair Ingredient - `getRepairIngredient()` What item or items can be used in an anvil to repair the armor items? @@ -74,7 +71,6 @@ The following methods will have to be implemented as well - these methods tell t @[code transcludeWith=:::6](@/reference/latest/src/main/java/com/example/docs/item/armor/GuiditeArmorMaterial.java) - - #### Name - `getName()` The name of the armor material - must be lowercase. @@ -83,7 +79,6 @@ The following methods will have to be implemented as well - these methods tell t @[code transcludeWith=:::7](@/reference/latest/src/main/java/com/example/docs/item/armor/GuiditeArmorMaterial.java) - - #### Toughness - `getToughness()` How much protection should be given for high-damage attacks? @@ -94,7 +89,6 @@ The following methods will have to be implemented as well - these methods tell t @[code transcludeWith=:::8](@/reference/latest/src/main/java/com/example/docs/item/armor/GuiditeArmorMaterial.java) - - #### Knockback Resistance - `getKnockbackResistance()` How much knockback resistance should the armor give the entity? @@ -146,13 +140,13 @@ You will need model JSON files for all the items, not just the helmet, it's the As you can see, in-game the armor items should have suitable models: -![](/assets/develop/items/armor_1.png) +![Armor item models](/assets/develop/items/armor_1.png) ## Armor Textures and Model When an entity wears your armor, currently the missing texture will appear: -![](/assets/develop/items/armor_2.png) +![Broken armor model on player.](/assets/develop/items/armor_2.png) This is because all armor textures are hardcoded by vanilla, to create our own, we'll have to place the texture in the vanilla armor texture folder. @@ -169,4 +163,4 @@ The first layer contains textures for the helmet and chestplate, whilst the seco When these textures are present, you should be able to see your armor on entities that wear it: -![](/assets/develop/items/armor_3.png) \ No newline at end of file +![Working armor model on player.](/assets/develop/items/armor_3.png) diff --git a/develop/items/custom-item-groups.md b/develop/items/custom-item-groups.md index aa0ed62d5..c8bfff5fd 100644 --- a/develop/items/custom-item-groups.md +++ b/develop/items/custom-item-groups.md @@ -31,7 +31,7 @@ To add items to the group, you can use the modify item group event similarly to 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. -![](/assets/develop/items/itemgroups_0.png) +![Item group without translation in creative menu](/assets/develop/items/itemgroups_0.png) ## Adding a Translation Key @@ -45,4 +45,4 @@ If you used `Text.translatable` for the `displayName` method of the item group b Now, as you can see, the item group should be correctly named: -![](/assets/develop/items/itemgroups_1.png) \ No newline at end of file +![Fully completed item group with translation and items](/assets/develop/items/itemgroups_1.png) diff --git a/develop/items/custom-item-interactions.md b/develop/items/custom-item-interactions.md index c8b5e02f9..51e6a2be0 100644 --- a/develop/items/custom-item-interactions.md +++ b/develop/items/custom-item-interactions.md @@ -53,7 +53,7 @@ A great example of these events being used can be found in the [Playing SoundEve | `useOnBlock` | Ran when the player right clicks a block with the item. | | `use` | Ran when the player right clicks the item. | -## The "use" event. +## The `use()` Event Let's say you want to make an item that summons a lightning bolt infront of the player - you would need to create a custom class. @@ -67,4 +67,4 @@ As usual, you should register your item, add a model and texture. As you can see, the lightning bolt should spawn 10 blocks infront of you - the player. -![](/assets/develop/items/interactive_0.webp) \ No newline at end of file +![Lightning bolt striking the ground after player uses item.](/assets/develop/items/interactive_0.webp) diff --git a/develop/items/custom-tools.md b/develop/items/custom-tools.md index 3f4835c06..e594027ed 100644 --- a/develop/items/custom-tools.md +++ b/develop/items/custom-tools.md @@ -9,7 +9,7 @@ authors: Tools are essential for survival and progression, allowing players to gather resources, construct buildings, and defend themselves. -## Creating a tool material. +## Creating a Tool Material ::: info If you're creating multiple tool materials, consider using an `Enum` to store them. Vanilla does this in the `ToolMaterials` class, which stores all the tool materials that are used in the game. @@ -23,16 +23,16 @@ You can create a tool material by creating a new class that inherits it - in thi The tool material tells the game the following information: -- #### Durability - `getDurability()` - +- ### Durability - `getDurability()` + How many times the tool can be used before breaking. **Example** @[code transcludeWith=:::2](@/reference/latest/src/main/java/com/example/docs/item/tool/GuiditeMaterial.java) - - #### Mining Speed - `getMiningSpeedMultiplier()` - +- ### Mining Speed - `getMiningSpeedMultiplier()` + If the tool is used to break blocks, how fast should it break the blocks? For reference purposes, the diamond tool material has a mining speed of `8.0F` whilst the stone tool material has a mining speed of `4.0F`. @@ -41,7 +41,7 @@ The tool material tells the game the following information: @[code transcludeWith=:::3](@/reference/latest/src/main/java/com/example/docs/item/tool/GuiditeMaterial.java) - - #### Attack Damage - `getAttackDamage()` +- ### Attack Damage - `getAttackDamage()` How many points of damage should the tool do when used as a weapon against another entity? @@ -49,7 +49,7 @@ The tool material tells the game the following information: @[code transcludeWith=:::4](@/reference/latest/src/main/java/com/example/docs/item/tool/GuiditeMaterial.java) - - #### Mining Level - `getMiningLevel()` +- ### Mining Level - `getMiningLevel()` What blocks can be broken by this tool? Can it mine diamonds? @@ -59,7 +59,7 @@ The tool material tells the game the following information: @[code transcludeWith=:::5](@/reference/latest/src/main/java/com/example/docs/item/tool/GuiditeMaterial.java) - - #### Enchantability - `getEnchantability()` +- ### Enchantability - `getEnchantability()` How easy is it to get better and higher level enchantments with this item? For reference, Gold has an enchantability of 22 whilst Netherite has an enchantability of 15. @@ -67,8 +67,8 @@ The tool material tells the game the following information: @[code transcludeWith=:::6](@/reference/latest/src/main/java/com/example/docs/item/tool/GuiditeMaterial.java) - - #### Repair Ingredient(s) - `getRepairIngredient()` - +- ### Repair Ingredient(s) - `getRepairIngredient()` + What item or items are used to repair the tool? **Example** @@ -79,7 +79,7 @@ Once you have created your tool material and tweaked it to your likings, you can @[code transcludeWith=:::8](@/reference/latest/src/main/java/com/example/docs/item/tool/GuiditeMaterial.java) -## Creating tool items. +## Creating Tool Items Using the same way you registered your first item, you should register each tool similarly: @@ -99,4 +99,4 @@ You will also have to add a texture, item translation and item model. However, f That's pretty much it! If you go in-game you should see your tool item(s) in the tools tab of the creative inventory menu. -![](/assets/develop/items/tools_1.png) \ No newline at end of file +![Finished tools in inventory](/assets/develop/items/tools_1.png) diff --git a/develop/items/first-item.md b/develop/items/first-item.md index 21aa17b91..fe16b8c62 100644 --- a/develop/items/first-item.md +++ b/develop/items/first-item.md @@ -15,7 +15,7 @@ If you aren't aware, everything in Minecraft is stored in registries, and items To simplify the registering of items, you can create a method that accepts an instance of an item and a string identifier. -You can put this method in a class called `ModItems` (or whatever you want to name the class!). +You can put this method in a class called `ModItems` (or whatever you want to name the class!). Mojang does this with their items as well! Check out the `Items` class for inspiration. @@ -64,7 +64,7 @@ This can be done in the `initialize` method of your items class. Loading into the game, you can see that our item has been registered, and is in the Ingredients item group: -![](/assets/develop/items/first_item_0.png) +![Item in the ingredients group](/assets/develop/items/first_item_0.png) However, it's missing the following: @@ -102,7 +102,7 @@ Create the model JSON in the `assets//models/item` folder, with the @[code](@/reference/latest/src/main/resources/assets/fabric-docs-reference/models/item/suspicious_substance.json) -![](/assets/develop/items/first_item_2.png) +![Item with correct model](/assets/develop/items/first_item_2.png) ## Making the Item Compostable or a Fuel @@ -139,4 +139,4 @@ This example uses the `LightningStick` class created in the [Custom Item Interac Each call to `add()` will add one line to the tooltip. -![Tooltip Showcase](/assets/develop/items/first_item_3.png) \ No newline at end of file +![Tooltip Showcase](/assets/develop/items/first_item_3.png) diff --git a/develop/items/food.md b/develop/items/food.md index 0d4305a33..fe7c93591 100644 --- a/develop/items/food.md +++ b/develop/items/food.md @@ -48,4 +48,4 @@ This makes the item: - A "snack". - Always give Poison II for 6 seconds when eaten. -![](/assets/develop/items/food_0.webp) \ No newline at end of file +![Player eating the food and getting the aforementioned effects.](/assets/develop/items/food_0.webp) diff --git a/develop/text-and-translations.md b/develop/text-and-translations.md index 0dcc60538..7f178510f 100644 --- a/develop/text-and-translations.md +++ b/develop/text-and-translations.md @@ -110,4 +110,4 @@ MutableText result = Text.literal("Hello World!") Underline§n Italic§o Obfuscated§k - \ No newline at end of file +