Apugli

Apugli

413k Downloads

`apugli:key_pressed` condition not working

Lilwhiteshark opened this issue ยท 5 comments

commented

Minecraft 1.19
Fabric 0.14.8
Apugli 1.8.0

JSON used for testing below:

{
    "type": "origins:action_over_time",
    "interval": 10,
    "entity_action":
    {
        "type": "origins:apply_effect",
        "effect":
        {
            "effect": "minecraft:glowing",
            "duration": 15
        }
    },
    "condition":
    {
        "type": "apugli:key_pressed",
        "key":
        {
            "key": "key.origins.secondary_active",
            "continuous": true
        }
    }
}

Expected result: Glowing effect is applied every 10 ticks when holding down the secondary active key

Actual result: Nothing happens

Nothing is showing up in the logs, the game is reading and validating the datapack correctly, the condition just appears to never become true when pressing the key.

I have tried with different keys and actions, as well as changing the "continuous" field; nothing seems to trigger the condition.

commented

Thanks for the report.

My guess is that the condition is not being synced serverside.

commented

Okay I've got it!

Key Pressed is missing its first initial step that's done on the client, Action Over Time is a serverside power so it can't access this first step. I'll look into how I could perform this step on the server without sending a packet every tick.

commented

I'm unsure how I'm going to go about fixing this, it may be a logistical nightmare.

This was definitely an oversight in how this condition functions.

commented

Will be fixed in v1.8.1, this version will release soon.

commented

Wow you work fast!

Just tested and it's working perfectly. Very much appreciated!