MerchantPug / apugli

An extension to Apoli for certain mods' use.
MIT License
5 stars 4 forks source link

Oddities with `apugli:modify_equipped_item_render` #43

Closed JustCyra closed 1 year ago

JustCyra commented 1 year ago

Don't know how to really describe the issue per say but this clearly doesn't work:

Example: Power on the Player is:

{
    "type": "apugli:modify_equipped_item_render",
    "slot": "mainhand",
    "scale": 1.0,
    "override": true,
    "merge_with_held": false,
    "condition": {
        "type": "apoli:equipped_item",
        "equipment_slot": "mainhand",
        "item_condition": {
            "type": "apoli:ingredient",
            "ingredient": {
                "item": "minecraft:golden_hoe"
            }
        }
    },
    "stack": {
        "item": "minecraft:golden_hoe",
        "tag": "{Enchatnemtns: [{id: \"minecraft:loyalty\", lvl: 1}]}",
        "amount": 1
    }
}

This is supposed to replace the render of a Golden Hoe with an enchanted Golden Hoe however it doesn't do it in Third Person. But what is more weird in First Person it creates a render of a Golden Hoe in both Off Hand and Main Hand even thought it only targets the Main Hand.

MerchantPug commented 1 year ago

Looking into this now, at first glance, your tag is wrong but I can confirm that something is wrong here.

"{Enchantments: [{id: \"minecraft:loyalty\", lvl: 1}]}" This above should be fixed, you had a typo with Enchantments.

MerchantPug commented 1 year ago

Update, third person seems to work fine once I fixed the item tag. First person's rendering is still unintended.

MerchantPug commented 1 year ago

And this was an easy fix. The issue was that I forgot to change the slot check from mainhand to offhand when handling offhand items.

Will be fixed next update.