StellarWind22 / Fabric-Shield-Lib

Library for easily adding new shields, shield enchantments, and enabling you to enchant shields in general without worry of conflictions.
https://www.curseforge.com/minecraft/mc-mods/fabric-shield-lib
GNU Lesser General Public License v2.1
40 stars 19 forks source link

Add support for custom shield shapes #158

Open CringeStar opened 11 months ago

CringeStar commented 11 months ago

I think this would be a big feature, but it would be very beneficial. I think we would have to look into the shield model, the texture, the rendering method, and the banner pattern textures.

CringeStar commented 11 months ago

The custom shape has been successful, though it is very manual so I don't know how much the library can help with that. A bigger obstacle is the banner designs, as for every custom shape of shield, a new set would have to be created and somehow be used instead of the default vanilla. Simply overwriting the vanilla textures doesn't work too well, even though that is the only way I can find of doing so. Overwriting the textures breaks the vanilla shield's pattern and it limits the mod creator to only 1 custom-shaped shield.

CringeStar commented 11 months ago

2023-09-27_16 46 22 2023-09-27_16 46 23 2023-09-27_16 46 26 2023-09-27_16 46 28 2023-09-27_18 04 53 2023-09-27_18 04 55 2023-09-27_18 04 57 2023-09-27_18 05 12

CringeStar commented 11 months ago

Additionally, the custom looks weird in the hand opposite of which it was designed for. For example, I designed this test shape when the shield was in the main hand, so it looks weird in the offhand.

StellarWind22 commented 9 months ago

We would need to write our own banner rendering system that can take in custom sets of banner textures and render them on the shield

StellarWind22 commented 9 months ago

for every new shield shape the end user would need to add a new set of banner textures to match

CringeStar commented 9 months ago

Yeah that was the biggest issue I faced. I couldn't find how to direct rendering for the custom shield to a custom set of banner patterns. I had to replace the vanilla textures. I think I attempted a mixin to change the path, but I'll have to look at it again.

CringeStar commented 3 months ago

In 1.20.5/6 there was an update to banner patterns for shield, it seems it is easier to add custom ones. Will look into it over the summer.