blackd / Inventory-Profiles

Take control over you inventory. Sort. Move matching/all Items. Throw all/all items. Locked slots. Gear sets! And much more!
https://inventory-profiles-next.github.io/
GNU Affero General Public License v3.0
146 stars 48 forks source link

Improper Components match during profile change/apply #416

Closed CreepilyCreeper closed 3 weeks ago

CreepilyCreeper commented 3 weeks ago

Have you asked for help in discord?

YES

CreepilyCreeper commented 3 weeks ago

So i was following this guide on how to do the profile config thing https://inventory-profiles-next.github.io/profiles/ but i cant have multiple items in order for a slot like demonstrated in the link Inventory Profiles Next - Profiles An inventory sorter mod i tried to do this

profile Usual_1
    HOT1
        "minecraft:diamond_sword" -> [ "minecraft:enchantments"("[\"minecraft:mending\",\"minecraft:sharpness\",\"minecraft:looting\"]"), "minecraft:repair_cost"("1") ]
    HOT2
        "minecraft:netherite_pickaxe" -> [ "minecraft:enchantments"("[\"minecraft:silk_touch\"]") ]
        "minecraft:diamond_pickaxe" -> [ "minecraft:enchantments"("[\"minecraft:silk_touch\"]") ]
        "minecraft:iron_pickaxe" -> [ "minecraft:enchantments"("[\"minecraft:silk_touch\"]") ]
        "minecraft:stone_pickaxe" -> [ "minecraft:enchantments"("[\"minecraft:silk_touch\"]") ]
        "minecraft:netherite_pickaxe"
        "minecraft:diamond_pickaxe"
        "minecraft:iron_pickaxe"
        "minecraft:stone_pickaxe"
    HOT3
        "minecraft:diamond_shovel"
    HOT4
        "minecraft:diamond_axe"
    HOT5
        "minecraft:netherite_hoe" -> [ "minecraft:enchantments"("[\"minecraft:silk_touch\"]") ]
        "minecraft:diamond_hoe" -> [ "minecraft:enchantments"("[\"minecraft:silk_touch\"]") ]
        "minecraft:iron_hoe" -> [ "minecraft:enchantments"("[\"minecraft:silk_touch\"]") ]
        "minecraft:stone_hoe" -> [ "minecraft:enchantments"("[\"minecraft:silk_touch\"]") ]
        "minecraft:netherite_hoe"
        "minecraft:diamond_hoe"
        "minecraft:iron_hoe"
        "minecraft:stone_hoe"
...

i have a stone hoe and it doesnt go into the hotbar, but the diamond sword does, the netherite pickaxe does, the diamond shovel doesnt and the diamond axe doesnt

CreepilyCreeper commented 3 weeks ago

apparently a new hoe works but a damaged hoe doesnt

https://github.com/blackd/Inventory-Profiles/assets/57177308/76935719-e8b1-454c-82b6-8d2ca8334f84

Neology92 commented 3 weeks ago

I think it's replicable for any damaged tool, which isn't enchanted (from my observations).

Isn't that related to Effect Components in v1.21 (Technical changes section)?

The effects field in an Enchantment is a map of Effect Component type the Effect List data. Most Effect Components are lists, so any number of Effects can be added of any Component Type. The data for each effect generally involves having a specified condition context and Effect Type, but some Effects also deviate from this format.
...
minecraft:item_damage: Effects for the amount of durability lost when an item is damaged

Isn't that a new way of handling durability in Minecraft?

Anyway, from my quick tests, seems like IPN requires items to overly match items with profile definitions. e.g.

"minecraft:diamond_pickaxe" -> [ "minecraft:enchantments"("[\"minecraft:efficiency\"]") ]

won't match a pickaxe, which has also the Unbreaking enchantment. (Isn't that unintended, btw?)

Soo, I believe the damaged tool receives now an effect, which is not defined in profile conf by IPN, but is required to be defined during profile load. That's still just a guess, but I hope it might help with fixing the issue quicker.

blackd commented 3 weeks ago

fixed before 5ad0d0f915f6d920cef3f2ddc403c4f6c68ed792