Pufferfish's Skills [Fabric & Forge & NeoForge]

Pufferfish's Skills [Fabric & Forge & NeoForge]

12M Downloads

Incompatibility : Tools from "Just Dire Things" do not grant experience

Elaski6573 opened this issue · 2 comments

commented

I'm encountering an incompatibility issue between Puffish Skills and the mod Just Dire Things.

When using tools added by Just Dire Things to break blocks (e.g. logs, ores, etc.), no experience is granted by Puffish Skills. However, breaking the same blocks using vanilla tools works as expected, and experience is awarded correctly.

Here is the relevant experience.json I used for testing. The logic grants experience for breaking blocks tagged as #mineable/axe, #mineable/hoe, etc., unless they are ores or leaves:

{
    "type": "puffish_skills:break_block",
    "data": {
        "variables": {
            "mineable_axe": {
                "operations": [
                    { "type": "get_broken_block_state" },
                    { "type": "puffish_skills:test", "data": { "block": "#mineable/axe" } }
                ]
            },
            "mineable_hoe": {
                "operations": [
                    { "type": "get_broken_block_state" },
                    { "type": "puffish_skills:test", "data": { "block": "#mineable/hoe" } }
                ]
            },
            "mineable_pickaxe": {
                "operations": [
                    { "type": "get_broken_block_state" },
                    { "type": "puffish_skills:test", "data": { "block": "#mineable/pickaxe" } }
                ]
            },
            "mineable_shovel": {
                "operations": [
                    { "type": "get_broken_block_state" },
                    { "type": "puffish_skills:test", "data": { "block": "#mineable/shovel" } }
                ]
            },
            "ores": {
                "operations": [
                    { "type": "get_broken_block_state" },
                    { "type": "puffish_skills:test", "data": { "block": "#c:ores" } }
                ]
            },
            "leaves": {
                "operations": [
                    { "type": "get_broken_block_state" },
                    { "type": "puffish_skills:test", "data": { "block": "#minecraft:leaves" } }
                ]
            }
        },
        "experience": [
            {
                "condition": "(!ores & !leaves) & (mineable_axe | mineable_hoe | mineable_pickaxe | mineable_shovel)",
                "expression": "1"
            }
        ]
    }
}

It seems unlikely that this issue is related to block tags or tool suitability, since:

  • The blocks being mined are correctly tagged (e.g. #mineable/pickaxe)
  • Puffish Skills uses break_block, which grants experience even with improper tools.

This suggests that tools from Just Dire Things may not be recognized by Puffish Skills as valid tools for block breaking events.

commented

Thanks for reporting. The Skills mod doesn't recognize tools from Just Dire Things mod because these tools break blocks in a custom way. This means that the vanilla block break code which the Skills mod injects to is not executed when using these tools. You can also notice that tools from Just Dire Things are not counted in the vanilla item use statistics.

The incompatibility could be fixed by uncommenting this line of code in the Just Dire Things mod. Alternative you can switch to Mine Block Experience Source instead of Break Block Experience Source if the slight difference in their behavior is acceptable for you.

commented

Thanks for the explanation

To resolve this on my end, I’ll switch from Break Block Experience Source to Mine Block Experience Source, as the behavioral difference is minor and acceptable for my use case.

Closes #42