Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple filters per entry in remappedStates #13

Open
dktapps opened this issue Oct 20, 2024 · 0 comments
Open

Support for multiple filters per entry in remappedStates #13

dktapps opened this issue Oct 20, 2024 · 0 comments

Comments

@dktapps
Copy link
Member

dktapps commented Oct 20, 2024

Since #6, oldState in remappedStates has been able to perform partial matches on states to apply transformations.
This has caused various issues:

pmmp/PocketMine-MP@8ccaf90
pmmp/PocketMine-MP@59d14de

To permit exact matching of a set of options without duplicating newState or other information, perhaps it would be a good idea to support something like this, which reduces duplication and takes less space:

{
    "oldState": [
        {
            "huge_mushroom_bits": {
                "int": 10,
            }
        },
        {
            "huge_mushroom_bits": {
                "int": 15,
            }
        }
    ],
    "newName": "minecraft:mushroom_stem",
    "newState": null,
    "copiedState": [
        "huge_mushroom_bits"
    ]
}

instead of having it like this:

{
    "oldState": {
        "huge_mushroom_bits": {
            "int": 10
        }
    },
    "newName": "minecraft:mushroom_stem",
    "newState": null,
    "copiedState": [
        "huge_mushroom_bits"
    ]
},
{
    "oldState": {
        "huge_mushroom_bits": {
            "int": 15
        }
    },
    "newName": "minecraft:mushroom_stem",
    "newState": null,
    "copiedState": [
        "huge_mushroom_bits"
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant