tutorial:shield
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:shield [2023/12/22 18:59] – just addded supported version cringestar_boi | tutorial:shield [2024/01/14 18:05] (current) – fixed model cringestar_boi | ||
---|---|---|---|
Line 2: | Line 2: | ||
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.\\ | ||
- | Luckily, StellarWind22 has already made a library to help with this! If she didn' | + | Luckily, StellarWind22 has already made a library to help with this! If she didn' |
- | Library | + | The library |
Library compiled as a jar is available at https:// | Library compiled as a jar is available at https:// | ||
Line 29: | Line 29: | ||
</ | </ | ||
- | At the time of writing, latest project.fabric_shield_lib_version should be 1.7.2, which supports versions 1.20.2-1.20.4, 1.20-1.20.1. 1.19.3-1.19.4, 1.19-1.19.2, 1.18.2, and 1.17.1 . This page will be updated whenever a new update comes out.\\ \\ | + | At the time of writing, |
+ | * **1.20.2** - **1.20.4** ('' | ||
+ | * **1.20** - **1.20.1** ('' | ||
+ | * **1.19.3** - **1.19.4** ('' | ||
+ | * **1.19** - **1.19.2** ('' | ||
+ | * **1.18.2** ('' | ||
+ | * **1.17.1** ('' | ||
**build.gradle** (inside repositories, | **build.gradle** (inside repositories, | ||
<code java> | <code java> | ||
Line 37: | Line 43: | ||
</ | </ | ||
- | __// | + | __// |
===== Adding a custom shield ===== | ===== Adding a custom shield ===== | ||
**If you want your shield to support banner decoration on your shield, please skip to the next section**\\ | **If you want your shield to support banner decoration on your shield, please skip to the next section**\\ | ||
On to the non-boring steps! We will now make a custom shield!\\ \\ | On to the non-boring steps! We will now make a custom shield!\\ \\ | ||
- | If you have followed the above steps correctly and refreshed the project, then you will have the fabric shield api installed.\\ | + | If you have followed the above steps correctly and refreshed the project, then you will have the FabricShieldLib |
If so, the first step to do is create a new instance of an Item like: | If so, the first step to do is create a new instance of an Item like: | ||
<code java> | <code java> | ||
Line 115: | Line 121: | ||
===== Adding a custom shield with banner support ===== | ===== Adding a custom shield with banner support ===== | ||
- | If you want to make your shield accept banners and decorateable like a vanilla shield, the process is slightly different. | + | The process is slightly different if you want to make your shield accept banners and decorateable like a vanilla shield. |
We still make the item in the same way, just make it a FabricBannerShieldItem: | We still make the item in the same way, just make it a FabricBannerShieldItem: | ||
Line 292: | Line 298: | ||
<code javascript> | <code javascript> | ||
{ | { | ||
- | " | + | " |
+ | " | ||
+ | " | ||
+ | } | ||
} | } | ||
</ | </ | ||
Line 333: | Line 342: | ||
" | " | ||
} | } | ||
+ | </ | ||
+ | |||
+ | And now your shield is fully completed and supports banner decoration! | ||
+ | |||
+ | ===== Changes for 1.19 ===== | ||
+ | If you are working in 1.19, make sure to change the FabricShieldLib and FAPI versions accordingly as well as changing your Midnight Lib and Mod Menu dependencies to these versions:\\ | ||
+ | **gradle.properties** | ||
+ | <code java> | ||
+ | midnightlib_version=1.0.0-fabric | ||
+ | mod_menu_version=4.2.0-beta.2 | ||
</ | </ |
tutorial/shield.1703271556.txt.gz · Last modified: 2023/12/22 18:59 by cringestar_boi