#Forge 1.19.2 - Trying to get Item Modification to work.

18 messages · Page 1 of 1 (latest)

sage birch
#

There are no events on the wiki for 1.19 for item modification, only Legacy, so thats what I was going off of.

ItemEvents.modification(event => {
    event.modify('mythicbotany:mjoellnir', item => {
        item.maxDamage = 100
    })

    event.modify('mythicbotany:alfsteel_helmet', item => {
        item.armorProtection = 4
        item.armorToughness = 4
    })

    event.modify('mythicbotany:alfsteel_chestplate', item => {
        item.armorProtection = 9
        item.armorToughness = 4
        item.armorKnockbackResistance = 11
    })

    event.modify('mythicbotany:alfsteel_leggings', item => {
        item.armorProtection = 7
        item.armorToughness = 3
    })

    event.modify('mythicbotany:alfsteel_boots', item => {
        item.armorProtection = 4
        item.armorToughness = 4
    })

})

Thats what I have, but no modifications / changes are happening. This file exists in kubejs>startup scripts, and doesnt seem to throw any errors in startup.txt

waxen hollowBOT
#

Paste version of server.txt from @sage birch

real ginkgoBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

waxen hollowBOT
#

Please send your startup.txt log file.
You can find it here: minecraft/logs/kubejs/startup.txt

sage birch
waxen hollowBOT
#

Paste version of startup.txt from @sage birch

sage birch
#

[06:06:46] [INFO ] Loaded script startup_scripts:custom_weapon_stat.js in 0.001 s

is the file where all 5 of those changes are housed, currently

flint shale
#

This is also how I modified durability on KJS6... hmmm

sage birch
#

Well heres an even bigger wrench.........

    event.modify('ad_astra:space_suit', item => {
        item.armorProtection = 100.0
        item.armorToughness = 100.0
        item.armorKnockbackResistance = 100.0

This works for the Space Suit from Ad Astra

#
    event.modify('mythicbotany:alfsteel_chestplate', item => {
        item.armorProtection = 9.0
        item.armorToughness = 4.0
        item.armorKnockbackResistance = 11.0

this does NOT work for Alfsteel armor?

forest plaza
sage birch
#

It's always the smallest things that are causing the biggest freakin problems for me.. haha

static garnet
#

If an item overrides the attribute methods then it will not work

#

This is the limitation of mixin

sage birch
#

so it's just hardcoded into Alfsteel then. That is so unfortunate, literally one of the few armor sets that I wanted to adjust haha...

sage birch
#

Thanks all, I appreciate it! Guess I'll close this ticket out!