
`apugli:modify_enchantment_level` crashes game if `apoli:enchantment` entity condition is present
JustCyra opened this issue ยท 6 comments
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
}
]
}
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.
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
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.