pufmat / skillsmod

A Minecraft mod that adds a fully configurable skill system to the game.
Other
36 stars 10 forks source link

1.21 "take_damage" experience source doesn't work #99

Closed Sokario closed 1 month ago

Sokario commented 1 month ago

I was testing your Take_Damage example on your wiki copy pasting it in game with the lastest mod version on 1.21 Minecraft. However, players doesn't gain xp when taking damage.

Here is the experience.json file:

{
    "experience_per_level": {
        "type": "expression",
        "data": {
            "expression": "min(level + 10, 400)"
        }
    },
    "sources": [
        {
            "type": "puffish_skills:take_damage",
            "data": {
                "variables": {
                    "damage": {
                        "operations": [
                            {
                                "type": "get_taken_damage"
                            }
                        ]
                    }
                },
                "experience": [
                    {
                        "expression": "damage"
                    }
                ]
            }
        }
    ]
}
pufmat commented 1 month ago

I have successfully reproduced this. Thanks for reporting, it will be fixed soon.

pufmat commented 1 month ago

Fixed in version 0.13.2.