User Tools

Site Tools


tutorial:shield

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:shield [2022/03/06 06:55] redgrapefruittutorial:shield [2022/09/04 21:43] – fixed mistakes, added dependencies, added discalimer cringestar_boi
Line 1: Line 1:
 +__**THIS PAGE SHOULD WORK FOR 1.17-1.18. THE 1.14-1.16 SECTIONS HAVE NOT BEEN TESTED IN A LONG TIME, SO THEY MAY NOT WORK. AT THIS TIME, THERE IS NOT WAY TO DO THIS IN 1.19**__
 +
 ====== Making a Custom Shield in Minecraft [1.18-1.14] ====== ====== Making a Custom Shield in Minecraft [1.18-1.14] ======
  
Line 20: Line 22:
 </code>\\  </code>\\ 
 At the time of writing, latest project.fabric_shield_lib_version should be 1.5.3-1.18. This page will be updated whenever a new update comes out.\\ \\  At the time of writing, latest project.fabric_shield_lib_version should be 1.5.3-1.18. This page will be updated whenever a new update comes out.\\ \\ 
-**build.gradle** (under repositories)\\ +**build.gradle** (under repositories, the one above dependencies)\\  
 +<code java> 
 + maven { url = 'https://jitpack.io'
 +</code>\\  
 + 
 +If you are doing this in Minecraft version 1.17 or higher or using FabricShieldLib version 1.5.0 or higher, add these things as well: 
 + 
 +**gradle.properties**\\  
 +<code java> 
 + fabric_asm_version=2.3 
 + cloth_version=6.2.57 
 + mod_menu_version=3.0.1 
 + crowdlin_version=1.4+1.18 
 +</code>\\  
 + 
 +**(These versions will be updated in this wiki alongside the mod version)** 
 + 
 +**build.gradle** (under dependencies)\\  
 +<code java> 
 + 
 + modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_version}") { 
 + exclude(group: "net.fabricmc.fabric-api"
 +
 + include("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_version}"
 + 
 + modCompileOnly modRuntimeOnly ("com.terraformersmc:modmenu:${project.mod_menu_version}"),
 + exclude(group: "net.fabricmc.fabric-api"
 +
 + 
 + modImplementation("com.github.Chocohead:Fabric-ASM:v${project.fabric_asm_version}") { 
 + exclude (group: "net.fabricmc.fabric-api"
 +
 + include("com.github.Chocohead:Fabric-ASM:v${project.fabric_asm_version}"
 + 
 +</code>\\  
 + 
 +**build.gradle** (under repositories, the one above dependencies)\\ 
 <code java> <code java>
-allprojects { repositories { maven { url 'https://jitpack.io' } } }+ maven { url "https://maven.shedaniel.me/" } 
 + maven { url "https://maven.terraformersmc.com/releases/" }
 </code>\\  </code>\\ 
  
Line 37: Line 76:
    
 <code java> <code java>
-Registry.register(Registry.ITEM, new Identifier("examplemod", "netherite_shield"), NETHERITE_SHIELD)+Registry.register(Registry.ITEM, new Identifier("examplemod", "netherite_shield"), NETHERITE_SHIELD);
 </code> </code>
  
 And our shield is done!\\  And our shield is done!\\ 
 Now, we have to create the textures and models of the shield.\\  Now, we have to create the textures and models of the shield.\\ 
-For the texture, you can use anything. A good place to start is looking at mojang's shield image and changing it. Put it in resources/textures/item/<filename>.png\\ +For the texture, you can use anything. A good place to start is looking at mojang's shield image and changing it. Put it in ''resources/assets/examplemod/textures/item/<filename>.png''\\ 
 Now, for the models, we have to write a few .json files.\\  Now, for the models, we have to write a few .json files.\\ 
 For the model file without blocking, we use: \\  For the model file without blocking, we use: \\ 
Line 61: Line 100:
 } }
 </code>\\  </code>\\ 
-Put it in resources/models/item/netherite_shield.json\\ +Put it in ''resources/assets/examplemod/models/item/netherite_shield.json''\\ 
 For the blocking model, use this: \\  For the blocking model, use this: \\ 
 <code javascript> <code javascript>
Line 69: Line 108:
 </code>\\  </code>\\ 
 Plop it in resources/models/item/netherite_shield_blocking.json\\ \\  Plop it in resources/models/item/netherite_shield_blocking.json\\ \\ 
-Don't forget to add it to **en_us.json**\\ +Don't forget to add it to **en_us.json** in ''resources/assets/lang/en_us.json''\\ 
 <code javascript> <code javascript>
 { {
Line 82: Line 121:
 If you are using 1.17 instead of 1.18, please change the fabric_shield_lib_version in **gradle.properties** to: If you are using 1.17 instead of 1.18, please change the fabric_shield_lib_version in **gradle.properties** to:
 <code java> <code java>
-fabric_shield_lib_version=1.4.5-1.17+fabric_shield_lib_version=1.5.0-1.17
 </code> </code>
  
Line 283: Line 322:
 </code> </code>
  
-For this next step, you will add ''_base'' to your current shield texture, so ''netherite_shield'' to ''netherite_shield_base''+For this next step, you will add ''_base_nopattern'' to your current shield texture, so ''netherite_shield'' to ''netherite_shield_base_nopattern''
-Then, you will need to make a ''nopattern'' version for your shield texture, so ''netherite_shield_base_nopattern''. I recommend looking at the vanilla shield's ''nopattern'' texture.+Then, you will need to make a ''base'' version for your shield texture, so ''netherite_shield_base''. I recommend looking at the vanilla shield's ''base'' texture.
  
 Then, you will move both of these textures into ''resources/assets/<modid>/textures/entity''. Then, you will move both of these textures into ''resources/assets/<modid>/textures/entity''.
Line 396: Line 435:
     private static final SpriteIdentifier NETHERITE_SHIELD_BASE_NO_PATTERN = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, new Identifier("examplemod","entity/netherite_shield_base_nopattern"));     private static final SpriteIdentifier NETHERITE_SHIELD_BASE_NO_PATTERN = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, new Identifier("examplemod","entity/netherite_shield_base_nopattern"));
 } }
-</code> 
 </code>  </code> 
    
Line 559: Line 597:
     private static final SpriteIdentifier NETHERITE_SHIELD_BASE_NO_PATTERN = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX, new Identifier("examplemod","entity/netherite_shield_base_nopattern"));     private static final SpriteIdentifier NETHERITE_SHIELD_BASE_NO_PATTERN = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX, new Identifier("examplemod","entity/netherite_shield_base_nopattern"));
 } }
-</code> 
 </code>  </code> 
    
tutorial/shield.txt · Last modified: 2024/01/14 18:05 by cringestar_boi