#Left Click with specific items in both hands

1 messages · Page 1 of 1 (latest)

worn fog
#

I'm trying to find a list of the variables and functions exposed in BlockEvents.leftClicked().

My goal is to left-click a block while holding specific items in each hand. The result would be removal of the 2 items held and giving a new item. (Recipe for an item by bashing 2 items into a rock, essentially.)

All I'm seeing in the tutorial pages are event.player.give() and event.block.set() which are both self-explanatory. I'm not seeing any way of checking what items the player is holding.

sand spireBOT
#

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

tame jettyBOT
#

ProbeJS is an addon mod for KubeJS that generates typings files for VSCode, allowing VSCode to offer autocompletions for a ton of things!

Mod by @ripe wave

wheat imp
#

probejs will tell you, but iirc its event.mainHandItem for main hand

#

offhand i dont remember

solar dagger
#
event.player.getHeldItem('main_hand')```
or ```js
event.player.getHeldItem('off_hand')```
worn fog
#

thanks