#Can i recreate the flint knapping mechanic from no tree punching with kjs?

13 messages · Page 1 of 1 (latest)

glad walrus
#

So basically when u right click flint on stone, it "breaks" and gives u 2 flint shards. Can i recreate this? also im not using no tree punching cuz the config is broken

hazy jackalBOT
#

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

lethal vortex
#

You can, but idk how

#

But I know you can

glad walrus
#

ok

lethal vortex
#

But I think its more easy to do this with the mod in mcreator

#

If you wont, i can do this

#

Its easy (i think)

glad walrus
#

I DID ITTTT

#

it just needs a bit more polishing

#
BlockEvents.rightClicked('minecraft:stone', e => {
    const { block, hand, item, world, player, server } = e;
    const activatorItem = 'minecraft:flint'
    var itemToPop = 'minecraft:diamond'
    const heldItem = player.getMainHandItem();

    if (heldItem === activatorItem){
        heldItem.setCount(heldItem.getCount() - 1);
        itemToPop = Item.of(itemToPop).withNBT(heldItem.nbt)
        e.block.popItem(itemToPop)

        
    }
})```
#

the code

#

how do i make it so that it takes maybe 2-3 tries for the flint to knap