#(1.21.5) Problem registering armor trim material and pattern

46 messages · Page 1 of 1 (latest)

fathom forum
#

Greetings. I recently started mod development, and I started with fabric. I'm studying it with Kaupenjoe's video series (intended for version 1.21.1, although there were breaking changes, the syntax is almost the same). I tried to register custom armor trim pattern and material, but I got two issues:

  • The new material is not recognized in the smithing table. (Image 1)
  • The pattern breaks the texture of the in game armor item. (Image 2)

Any ideas? Also, I have the textures for the trim template, but maybe they are in the wrong folders for this version.
The armor models are in resources/assets/tutorialmod/textures/trims/models/armor and the color_palettes in resources/assets/tutorialmod/textures/trims/color_palettes .

More information in the Snippets.md file.

modest latch
#

I can help with trim material only 🧐

#

You have to give the datacomponent using .trimMaterial to the item you want to make the trim material and also there's a tag for trim materials

fathom forum
#

I have both of those declared (can see how in the snippets.md file)

modest latch
fathom forum
#

Thanks. I'll take a look and let you know if it works

fathom forum
#

@modest latch Why do you use ResourceKey instead of RegistryKey?

modest latch
#

mojmaps

fathom forum
#

Oh, oke

fathom forum
#

@modest latch Did you use datagen for the trim info? I cant find your datagen entrypoint in your reepo

#

But I see you have the generated folder

modest latch
#

trim info ?

#

what info

fathom forum
#

Nevermind. I fixed the item texture part. The route for the trim textures changed from version 1.21.3 to 1.21.5

#

The only bug remaining is the trim material

fathom forum
#

Now its fixed but the item in the inventory doesnt have the trimmed variation (im hovering the custom one)

#

Before it is a regular lapiz pattern

modest latch
#

Bcz vanilla items can't have it

#

Only if you will to break the vanilla item models which I don't recommend

stiff nova
#

Mixson can probably apply it to vanilla

modest latch
#

Oh mixin json hm true

#

Even tho it's a pain

modest latch
stiff nova
#

Yeah true

modest latch
#

So that's just for vanilla

stiff nova
#

I wonder if you can automatically apply the trim rendering to any model, but it might break other mods

modest latch
#

Would need a custom model for armor items to automatically take trim materials that exist at mod init 😭

stiff nova
#

Nah just render the trim over it and hope you can fix all z-fighting

modest latch
#

It already renders over it

#

From the atlases

stiff nova
#

Wait then why can’t you manually render it over all equipment

#

Am I missing something

modest latch
#

It's still a property in the json

#

It's only in the json set to render over it

stiff nova
#

Mixin into the itemrenderer

#

Or the armorfeaturerenderer or whatever

modest latch
#

Not sure if that's what handles the armor items aswell

stiff nova
#

¯_(ツ)_/¯

modest latch
#

I'd have to check lol

modest latch
#

Wait there is already a trim material property and can be added to the armor to be able to show all existing trims ..
-# nvm thats already used by armor

fathom forum
#

The custom armor doesnt have it either

modest latch
#

you can add it on your custom armor

#

you just need either long way with long code or short way with mixins which can also make it compatible with other mods I think 🤔

#

-# in case you datagen it

fathom forum
#

I rather the long code way. I haven't learned mixins yet