CIT Resewn

CIT Resewn

14M Downloads

Can't get texture layers to work

xllifi opened this issue ยท 1 comments

commented

Hi! I need some help with sub textures in CIT Resewn

fire_aspect.properties file

type=item
items=wooden_sword
texture.layer0=textures/item/sword_fire_aspect
nbt.Enchantments.0.id=minecraft:fire_aspect

wooden_sword.json file (model). Changed for the sake of putting fire aspect texture underneath the sword texture

{
  "parent": "minecraft:item/handheld",
  "textures": {
    "layer0": "minecraft:item/empty",
    "layer1": "minecraft:item/wooden_sword"
  }
}

Sub texture doesn't change after adding an enchantment
There are no errors with CIT in console
This is my testing resource pack. Includes:

  • Edited paper.json (layer0 is paper, layer1 is cyan_dye) model
  • Edited wooden_sword.json (layer0 is empty, layer1 is wooden_sword) model
  • sword_fire_aspect.png, empty.png textures
  • optifine/cit/swords/wooden/fire_aspect.properties CIT properties file




CIT Resewn v1.1.3+1.20 | Full mod list

commented

You were right, what you had should've worked and I'll take a look at why it isnt the case.

Aside from that what you should do now(and in general) is use a separate model when you modify something in an item and you shouldnt really rely on having an empty layer in the vanilla model. As I said, it should work but it's the incorrect approach.

What I'd personally do instead(which does work) is if a sword is matched correctly against my conditions(in this case fire aspect) I'd switch the model away from the vanilla one to a model that has two layers. Then set the layer to something else by texture name rather than model layer name.
For example, I'd set up an empty texture minecraft:textures/item/sword_effect_none and have the fire overlay as minecraft:textures/item/sword_effect_fire and have the custom model minecraft:item/wooden_sword_two_layers which has the layers of wooden sword and sword_effect_none.
Then the properties file would look a bit like this:

type=item
items=wooden_sword
enchantments=minecraft:fire_aspect
model=item/wooden_sword_two_layers
texture.sword_effect_none=item/sword_effect_fire