#Help needed. Tags to make un-mineable blocks mine-able.

5 messages · Page 1 of 1 (latest)

fallen geyser
#

Hi, so i want to make the End Portal Frame mineable, for a SkyBlock Modpack.
I already have the following script, but i cannot mine the Block. What am i missing?

    let tags = [`minecraft:incorrect_for_wooden_tool`, `minecraft:incorrect_for_stone_tool`, `minecraft:incorrect_for_iron_tool`, `minecraft:incorrect_for_gold_tool`, `minecraft:incorrect_for_diamond_tool`, `minecraft:needs_netherite_tool`];
    tags.forEach(t => {
        event.add(t, '#minecraft:end_portal_frame');
    })});```

Help is appreciated 🙂
Neoforge, KubeJS v.2101.7.2-build.336, 1.21.1
sinful mothBOT
#

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

fallen geyser
#

Edit:
Block has been made mineable, but it wont drop... how can i change that?

  event.modify('minecraft:end_portal_frame', block => {
    block.destroySpeed = 1.0
    block.hasCollision = false
  })
})```
cold shale
#

I actually had the same exact issue, spent a while looking through the docs, didn't find a way to add a loot table to the block (that was working). But I figured out a different way (this goes to server_scripts):

BlockEvents.broken("minecraft:end_portal_frame", e => {
  e.block.set("minecraft:air")
  e.block.popItem("minecraft:end_portal_frame")
})
})

When you break the block, it sets the block space to air, and drops the end portal frame as an item.

it's a bit janky but it works.