#Remove Block drop with lootJS

13 messages · Page 1 of 1 (latest)

proper drum
#

Hey guys, I have not much knowledge about LootJS and I want to change in general that all logs can only be mined with an axe and otherwise do not drop loot (the log).

I started by removing the tags like mineble/hand_axe with kubejs and added tags like minecraft:needs_stone_tool, but this has not changed anything.

So I used/read a bit about lootJS but the wiki explain everything a bit (not bad sry Lytho). I tried first to disable completely the drop but this also dont work.
I do not know what to do now, maybe someone have more knowledge about lootJS xD

onEvent("lootjs", (event) => {
    event
        .addBlockLootModifier("minecraft:oak_log")
        .removeLoot("minecraft:oak_log");
})
deft cliffBOT
#

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

fallow forge
#

@hasty kettle bad wiki nkoGiggle

hasty kettle
#

lol

#

wiki bad, me bad Shruge

proper drum
#

I mean by this complex (for me) sry xDDxd

proper drum
#

Sry I was to dump to understand the wiki xd

onEvent("lootjs", (event) => {
    event
        .addBlockLootModifier("minecraft:oak_log")
        .removeLoot("minecraft:oak_log")
})

onEvent("lootjs", (event) => {
    event
        .addBlockLootModifier("minecraft:oak_log")
        .matchMainHand(ItemFilter.AXE)
        .addLoot("minecraft:oak_log")
})

This work for all modded axes, but not for the vanilla one (idk why)
Can I add a custom tag with KubeJS to select all axes which should be able to get a loot drop?
When yes, how can I implement this tag into the matchMainHand event?

fallow forge
#

why 2 separate events

proper drum
#

man I do my best to understand this xDDD, yes I will make just one

fallow forge
#
onEvent('lootjs', e => {
  e.addBlockLootModifier('minecraft:oak_log')
    .removeLoot('minecraft:oak_log')

  e.addBlockLootModifier('minecraft:oak_log')
    .matchMainHand(ItemFilter.AXE)
    .addLoot('minecraft:oak_log')
})
proper drum
#

thx, should normally with the ItemFilter also the vanilla axes work? maybe the tetra mod makes some things broken

#

Okay with a tag it works, many many thanks for the help and sry for the offense against the wiki 7545minecraftheart

deft cliffBOT
#

@proper drum Unresolved thread still hasn't been closed! If your question was answered, please close this post with </ticket close:1054771505520717835> command!