addGlobalAttributeModifier not working
ereese99 opened this issue ยท 7 comments
Issue description
Upon loading in I get this:
"No such member: addGlobalAttributeModifier"
"Scripts are invalid!"
Steps to reproduce
Put a line of code into my script.zs
Script used
tag:items:mythicmetals:aquarium_ingots.addGlobalAttributeModifier("845db27c-c624-495f-8c9f-6020a9a58b6b", "Armor modifier", 1, AttributeOperation.ADDITION, [constant:minecraft:equipmentslot:feet]);
The crafttweaker.log file
https://gist.github.com/ereese99/46f62cf146b897c098f6d297fd197a15
Minecraft version
1.19
Modloader
Fabric
Modloader version
0.14.17
CraftTweaker version
10.1.39
Other relevant information
No response
The latest.log file
https://gist.github.com/ereese99/fb42b54f09540569a415625190663f3a
<tag:items:mythicmetals:aquarium_ingots>asIIngredient().addGlobalAttributeModifier("845db27c-c624-495f-8c9f-6020a9a58b6b", "Armor modifier", 1, AttributeOperation.ADDITION, [<constant:minecraft:equipmentslot:feet>]);
You need to do it like this
https://gist.github.com/ereese99/f5abd1c77ab62f468aa4f8f011dce5ca
Missing semicolon somehow
<tag:items:mythicmetals:aquarium_ingots>.asIIngredient().addGlobalAttributeModifier("845db27c-c624-495f-8c9f-6020a9a58b6b", "Armor modifier", 1, AttributeOperation.ADDITION, [<constant:minecraft:equipmentslot:feet>]);
I made a typo, this one should work