EdwinMindcraft / origins-architectury

MIT License
20 stars 17 forks source link

[Bug - Forge 1.20.1] Resource management assumingly do not work on mobs #372

Closed KamiSami closed 11 months ago

KamiSami commented 12 months ago

Title pretty much, i've been for several hours trying to get my origin work that i accidentally noticed, that recourse management do not function on mobs at all, but they do on players..? For example I have resource from 0 to 1200, and every 1 tick it will be raised from 0 to 1 and so on. This works on player, but not on mobs as i mentioned for whatever reason with exact same power granted either myself or the said mobs... So the way how power works, it is supposed to be given to cat. And after receiving it, the cat will last one minute before teleporting to void and deleted, to make it seem it warps out of existence. If im doing something wrong, please let me know that too. A brief look on the power i've been editing, is like this:

{ "type": "origins:multiple", "cat_poof_resource": { "type": "origins:resource", "min": 0, "max": 1200, "hud_render": { "should_render": false }, "start_value": 0 }, "resource_regen": { "type": "origins:action_over_time", "interval": 1, "entity_action": { "type": "origins:change_resource", "resource": "yaga:cat1_cat_poof_resource", "change": 1 }, "condition": { "type": "origins:resource", "resource": "yaga:cat1_cat_poof_resource", "comparison": "<=", "compare_to": 1199 } }, "disappear_after_minute": { "type": "origins:action_over_time", "entity_action": { "type": "origins:execute_command", "command": "tp @s ~ -1000 ~" }, "interval": 1, "condition": { "type": "origins:resource", "resource": "yaga:cat1_cat_poof_resource", "comparison": ">=", "compare_to": 1199 } }, "disappear_after_minute2": { "type": "origins:action_over_time", "entity_action": { "type": "origins:execute_command", "command": "kill @s" }, "interval": 1, "condition": { "type": "origins:resource", "resource": "yaga:cat1_cat_poof_resource", "comparison": ">=", "compare_to": 1200 } }, "disappear_after_minute3": { "type": "origins:action_over_time", "entity_action": { "type": "origins:execute_command", "command": "power revoke @s yaga:cat1" }, "interval": 1, "condition": { "type": "origins:resource", "resource": "yaga:cat1_cat_poof_resource", "comparison": ">=", "compare_to": 1200 } } }

MerchantPug commented 12 months ago

We were accidentally checking for if the entity in the condition was a Player, when we should've been checking for a LivingEntity instead.

KamiSami commented 12 months ago

Oh sweet, this means it's fixed? Should i expect hotfix on CF anytime soon?

MerchantPug commented 12 months ago

Oh sweet, this means it's fixed? Should i expect hotfix on CF anytime soon?

I'm going to go through and handle the bugs found on 1.19.2 and then handle them on 1.20, then a fix will be out.

So yes, it'll be sometime soon.