#[LootJS] Issue with Damage Source-related Drop

1 messages · Page 1 of 1 (latest)

shy yacht
#

I'm trying to replace every instance of Bear Fur with Bear Dust whenever a Grizzly Bear dies from Crushing Wheels, but it doesn't appear to be modifying the drop at all. Could anyone help?

LootJS.modifiers(event => {
    event.addEntityLootModifier("alexsmobs:grizzly_bear")
        .matchDamageSource(source => {source.anyType("create:crush")})
        .replaceLoot("alexsmobs:bear_fur", "alexsmobs:bear_dust")
})

In case it's needed:

  • KubeJS is on 2001.6.5-build.16
  • LootJS is on 1.20.1-2.12.0
somber sequoiaBOT
#

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

shy yacht
#

bump

abstract cradle
#

has to be the source type that's not correct / non existent.

#

yea it's not create:crush, just crush. reference

shy yacht
#

changing it to crush doesn't seem to do anything

abstract cradle
#

hmm yea i don't know. can you test without damage source just to be sure it works?

#

just to be certain the issue is the source. i don't know what else it could be, and if it's the source, i'm not sure what the source type could be if it's not either of those 2

#

wonder if there's a way to log the source type

shy yacht
#

it works without matchDamageSource

#

also works if i change the source to a vanilla one like lava

abstract cradle
#

so there's a way with kubejs to log source

#

this should log it

EntityEvents.death('alexsmobs:grizzly_bear', event => {
  console.log(event.getSource().type().toString())
});
#

OOH

#

i notice your issue

#

lol

#

you never returned the source type to match

#

wait

#

nvm you don't return it

shy yacht
#

i think i found it out

#

the source has to be create.crush

abstract cradle
#

that was the message id.. couldn't have thought it was that

shy yacht
#

yeah it works now

abstract cradle
#

well then haha

shy yacht
#

me neither i thought i would need a colon LOL

#

ty for the help

abstract cradle
#

np