McJtyMods / InControl

Be In Control of Mob Spawns and others
MIT License
46 stars 18 forks source link

Applying attributes fills server log with error " [minecraft/AttributeModifier]: Unable to create attribute: null " #439

Open Ernesto-Velasco-Aguilar opened 3 months ago

Ernesto-Velasco-Aguilar commented 3 months ago

Applying a sentence like the following:

        {
        "mob": ["minecraft:skeleton"],
        "when":"finalize",
        "nbt": {
          "Attributes": [
        {
          "Base": 3.0,
          "Modifiers": [
        {
          "Name": "minecraft:generic.armor"
        }
          ],
          "Name": "minecraft:generic.armor"
        }
          ]
        },
        "result":"default",
        "continue": "true"
    },

Will work correctly and apply the attributes to the mob. However; The server log will be filled with errors such as:

[minecraft/AttributeModifier]: Unable to create attribute: null

Unsure if this is a bug in InControl or with Minecraft itself. Posting the issue here as requested in discord. I will add any update in comments If I manage to find anything.

Ernesto-Velasco-Aguilar commented 1 month ago

Update, ,managed to "fix" it by doing the same sentence but removing the Modifier part, for example: "nbt": { "Attributes": [ { "Base": 3.0, "Name": "attributeslib:arrow_damage" } ] },

This however means that if you want to use the Modifier function specifically this is still an issue, so in case that could be needed by anyone I'll leave the issue as opened in case something could be done about it.

It would also be nice to update the example in the wiki, as that one will have the error since it uses Modifiers.