Diet (Fabric/Forge/Quilt)

Diet (Fabric/Forge/Quilt)

6M Downloads

[Bug]: 'Every' condition not stacking correctly with status effects

mmandersmc opened this issue ยท 0 comments

commented

What happened?

(Tested in version 1.18.2 in an environment using exclusively Diet)

When you set a status effect to trigger using the every match case, the status effect doesn't stack properly with level 1 status effects.

For example, in the image below, I have set up two effects for when the player is low on a food group and very low on a food group. The effect is supposed to stack based on how many groups are in the threshold, of course.
image

However, for the bottom effect, which applies Slowness, this stacking doesn't happen at all.

Shown below, only the Fruits category is set to 0%. This is working properly, as Slowness is given at level 1, and Hunger is given at level 2.
image

Once any other categories also reach 0%, Hunger is increased by 1 level each, as it should be. However, Slowness does not increase at all. This can be seen for all 4 levels.
image
image
image

Slowness remains at level 1 while Hunger increases each time, despite both being set to every. The only difference is the starting level, so it seems like this only happens for effects set to start at power = 0 (level 1). I tested this with several other effects as well, and this only happened for effects set to power 0.

How do you trigger this bug?

Set any status effect to power = 0 and have its trigger match case set to every.

Forge Version

Forge - 40.1.60

Mod Version

Diet 1.18.2-1.3.1.0

Other Relevant Mod Versions

No response

Relevant Log Outputs

diet-effects.toml

[[effects]]
    [[effects.status_effects]]
        name = "minecraft:hunger"
        power = 1
    [[effects.conditions]]
        groups = ["fruits", "vegetables", "proteins", "grains"]
        match = "every"
        above = 0.0
        below = 0.075
[[effects]]
    [[effects.status_effects]]
        name = "minecraft:slowness"
        power = 0
    [[effects.conditions]]
        groups = ["fruits", "vegetables", "proteins", "grains"]
        match = "every"
        above = 0.0
        below = 0.01