tutorial:shield
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:shield [2022/03/06 06:55] – redgrapefruit | tutorial:shield [2022/12/17 15:22] – Registry.ITEM -> Registries.ITEM miir | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Making a Custom Shield in Minecraft [1.18-1.14] ====== | + | __**THIS PAGE SHOULD WORK FOR 1.17-1.19. THE 1.14-1.16 SECTIONS HAVE NOT BEEN TESTED IN A LONG TIME, SO THEY MAY NOT WORK.**__ |
+ | |||
+ | ====== Making a Custom Shield in Minecraft [1.19-1.14] ====== | ||
Congrats! You just learned how to create your custom sword in the last tutorial! Now imagine you want to shield yourself from that sword if your friend got it. If you made it too op, a regular shield won't do. So we will see how to make a custom shield.\\ | Congrats! You just learned how to create your custom sword in the last tutorial! Now imagine you want to shield yourself from that sword if your friend got it. If you made it too op, a regular shield won't do. So we will see how to make a custom shield.\\ | ||
Line 13: | Line 15: | ||
**gradle.properties**\\ | **gradle.properties**\\ | ||
<code java> | <code java> | ||
- | fabric_shield_lib_version=1.5.3-1.18 | + | fabric_shield_lib_version=1.6.0-1.19 |
</ | </ | ||
**build.gradle** (under dependencies)\\ | **build.gradle** (under dependencies)\\ | ||
Line 19: | Line 21: | ||
modImplementation " | modImplementation " | ||
</ | </ | ||
- | 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.6.0-1.19. 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 = ' | ||
+ | </ | ||
+ | |||
+ | __//**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=8.1.77 | ||
+ | mod_menu_version=4.0.6 | ||
+ | crowdlin_version=1.4+1.19 | ||
+ | </ | ||
+ | |||
+ | **(These versions will be updated in this wiki alongside the mod version)** | ||
+ | |||
+ | **build.gradle** (under dependencies)\\ | ||
+ | <code java> | ||
+ | |||
+ | modApi(" | ||
+ | exclude(group: | ||
+ | } | ||
+ | include(" | ||
+ | |||
+ | modCompileOnly modRuntimeOnly (" | ||
+ | exclude(group: | ||
+ | } | ||
+ | |||
+ | modImplementation(" | ||
+ | exclude (group: " | ||
+ | } | ||
+ | include(" | ||
+ | |||
+ | </ | ||
+ | |||
+ | **build.gradle** (under repositories, | ||
<code java> | <code java> | ||
- | allprojects { repositories { maven { url 'https://jitpack.io' } } } | + | maven { url "https://maven.shedaniel.me/" |
+ | maven { url " | ||
</ | </ | ||
Line 37: | Line 76: | ||
<code java> | <code java> | ||
- | Registry.register(Registry.ITEM, new Identifier(" | + | Registry.register(Registries.ITEM, new Identifier(" |
</ | </ | ||
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' | + | For the texture, you can use anything. A good place to start is looking at mojang' |
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: | ||
} | } | ||
</ | </ | ||
- | Put it in resources/ | + | Put it in '' |
For the blocking model, use this: \\ | For the blocking model, use this: \\ | ||
<code javascript> | <code javascript> | ||
Line 69: | Line 108: | ||
</ | </ | ||
Plop it in resources/ | Plop it in resources/ | ||
- | Don't forget to add it to **en_us.json**\\ | + | Don't forget to add it to **en_us.json** |
<code javascript> | <code javascript> | ||
{ | { | ||
Line 80: | Line 119: | ||
===== Adding banner support to your shield (1.17+) ===== | ===== Adding banner support to your shield (1.17+) ===== | ||
- | If you are using 1.17 instead of 1.18, please change | + | If you are using 1.17/1.18 instead of 1.19, please change |
<code java> | <code java> | ||
- | fabric_shield_lib_version=1.4.5-1.17 | + | fabric_shield_lib_version=1.5.3-1.18 |
+ | fabric_asm_version=2.3 | ||
+ | cloth_version=6.2.57 | ||
+ | mod_menu_version=3.0.1 | ||
+ | crowdlin_version=1.4+1.18 | ||
</ | </ | ||
+ | or | ||
+ | <code java> | ||
+ | fabric_shield_lib_version=1.5.3-1.17 | ||
+ | fabric_asm_version=2.3 | ||
+ | cloth_version=5.3.63 | ||
+ | mod_menu_version=2.0.15 | ||
+ | crowdlin_version=1.3+1.17 | ||
+ | </ | ||
+ | |||
This is where mixins get involved. | This is where mixins get involved. | ||
Line 283: | Line 335: | ||
</ | </ | ||
- | For this next step, you will add '' | + | For this next step, you will add '' |
- | Then, you will need to make a '' | + | Then, you will need to make a '' |
Then, you will move both of these textures into '' | Then, you will move both of these textures into '' | ||
Line 396: | Line 448: | ||
private static final SpriteIdentifier NETHERITE_SHIELD_BASE_NO_PATTERN = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, | private static final SpriteIdentifier NETHERITE_SHIELD_BASE_NO_PATTERN = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, | ||
} | } | ||
- | </ | ||
</ | </ | ||
Line 559: | Line 610: | ||
private static final SpriteIdentifier NETHERITE_SHIELD_BASE_NO_PATTERN = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX, | private static final SpriteIdentifier NETHERITE_SHIELD_BASE_NO_PATTERN = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX, | ||
} | } | ||
- | </ | ||
</ | </ | ||
tutorial/shield.txt · Last modified: 2024/07/03 07:08 by solidblock