Apugli

Apugli

413k Downloads

`apugli:modify_enchantment_level` crashes game if `apoli:enchantment` entity condition is present

JustCyra opened this issue ยท 6 comments

commented

This power crashes the came if an entity condition apoli:enchantment is put inside the condition field
Example Power:

{
    "type": "apugli:modify_enchantment_level",
    "enchantment": "minecraft:fire_aspect",
    "condition": {
        "type": "apoli:enchantment",
        "enchantment": "minecraft:protection",
        "calculation": "max",
        "comparison": "==",
        "compare_to": 0
    },
    "modifiers": [
        {
            "operation": "add_base_early",
            "value": 1
        }
    ]
}
commented

Okay so the issue lies in the game just running the same bit of code over and over due to the condition being met and unmet repeatedly.

commented

Adding on, apoli:enchantment Item Condition also seems to crash if added via apoli:equipped_item Entity Condition
The crash happens if the targeted item is held in the specified hand

commented

Going to look into this rn

commented

I've fixed this by letting the power cache the modifier value and active state of this power and comparing it to the current power, so yeah, it should now work!

Edit: I've started on fixing this. but I don't think it's ready yet.

commented

This will be fixed in 2.0.0, thank Jarva for the help.

commented

Fixed in v2.0.0