#Can i recreate the flint knapping mechanic from no tree punching with kjs?
13 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
ok
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)
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