LunaPixelStudios / Medieval-MC

https://lunapixel.studio/discord
https://lunapixel.studio/discord
15 stars 9 forks source link

Modify break speed ignores the configured modifier when applying a command condition #685

Closed NereaCassian closed 12 months ago

NereaCassian commented 12 months ago

Describe the Bug

Modify break speed ignores the configured modifier when applying a command condition or a condition that depends on a command condition.

This is my code.

    "breakspeed":{
        "type": "origins:modify_break_speed",
        "block_condition": {
            "type": "origins:block",
            "block": "minecraft:dirt"
        },
        "modifier": {
            "operation": "add_base_early",
            "value": 3.0
        },
        "condition": {
            "type": "origins:command",
            "command": "execute as @a at @s anchored eyes positioned ^ ^ ^ if entity @s[distance=..1]",
            "comparison": "==",
            "compare_to": 1
        },

    },

This checks if the user is crawling, it works with a origins:conditioned_attribute but when used with origins:modify_break_speed it modifies the braking speed to the maximum.

I tried to use a power active condition that depend on the origins:conditioned_attribute that has the crawling command, but it also breaks, even if I use a scoreboard condition that checks if a crawl score is fulfilled it breaks too.

Reproduction Steps

  1. Create a origins:modify_break_speed power
  2. Use a command condition ...

Screenshots and Videos

https://github.com/LunaPixelStudios/Medieval-MC/assets/70113068/3c1c82e8-e3fa-43c5-a6e7-dbe799a5bac3

Crash Report or Log

No response

Operating System

Windows 11

Minecraft Version

1.19

Modloader

Forge

Modpack Version

1.7.1.3

Optifine

No

Other Mods

No response