#right click action

45 messages · Page 1 of 1 (latest)

scarlet hatch
#

i need help can someone tell me what should i do to shift right click on a block = item but only shift right click and with emtpy hand

narrow slateBOT
#

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

scarlet hatch
#

please help me..

unreal musk
# scarlet hatch please help me..
BlockEvents.rightClicked(event => {
    const {player, item} = event
    if(!player.crouching) return;
    if(!item.empty) return;
    player.tell("you shift right clicked with bare hand")
})
scarlet hatch
#

i wil ltry <3

#

if i want to spawn an item i need to put what ?

#

and the script execut 2 time idk why

scarlet hatch
#

and only on the grass_block possible... ?

unreal musk
#
BlockEvents.rightClicked(event => {
    const {player, item, hand, block, facing} = event
    if(hand == "offhand") return;
    if(!block.blockState.is(Block.getBlock("minecraft:grass_block"))) return
    if(!player.crouching) return;
    if(!item.empty) return;
    block.popItemFromFace(Item.of("diamond"), facing)
})
scarlet hatch
#

THANKS YOU SO MUCH

#

FOR REAL

#

but why 2 diamond spawn .. x))) ?

unreal musk
#
BlockEvents.rightClicked(event => {
    const {player, item, hand, block, facing} = event
    if(hand == "off_hand") return;
    if(!block.blockState.is(Block.getBlock("minecraft:grass_block"))) return
    if(!player.crouching) return;
    if(!item.empty) return;
    block.popItemFromFace(Item.of("diamond"), facing)
})
scarlet hatch
#

still 2 diamond

#

:/

scarlet hatch
unreal musk
#

how is it the same

unreal musk
#
BlockEvents.rightClicked(event => {
    const {player, item, hand, block, facing} = event
    const $InteractionHand = Java.loadClass("net.minecraft.world.InteractionHand")
    if(hand.equals($InteractionHand.OFF_HAND)) return;
    if(!block.blockState.is(Block.getBlock("minecraft:grass_block"))) return
    if(!player.crouching) return;
    if(!item.empty) return;
    block.popItemFromFace(Item.of("diamond"), facing)
})
scarlet hatch
#

thanks

#

you

#

so

#

much

#

❤️

#

is there a way to put 25% of luck that i can get the item ?

unreal musk
#
BlockEvents.rightClicked(event => {
    const {player, item, hand, block, facing} = event
    const $InteractionHand = Java.loadClass("net.minecraft.world.InteractionHand")
    if(Utils.getRandom().nextFloat() > 0.25) return;
    if(hand.equals($InteractionHand.OFF_HAND)) return;
    if(!block.blockState.is(Block.getBlock("minecraft:grass_block"))) return
    if(!player.crouching) return;
    if(!item.empty) return;
    block.popItemFromFace(Item.of("diamond"), facing)
})
scarlet hatch
#

is there a way to have the same thing but with lychee ?

#

or not ?

unreal musk
#

what's lychee

scarlet hatch
unreal musk
#

Then what do you mean with lychee

scarlet hatch
#

like the same thing but lychee show it in jei / rei and the arm moving when right clicking

unreal musk
#

then why don't you just use lychee

scarlet hatch
#

cause i can't understand how tu put the sneak argument

#

i did everything but work without shift

#

and i want to it only with shift

unreal musk
#
BlockEvents.rightClicked(event => {
    const {player, item, hand, block, facing} = event
    const $InteractionHand = Java.loadClass("net.minecraft.world.InteractionHand")
    if(Utils.getRandom().nextFloat() > 0.25) return;
    if(hand.equals($InteractionHand.OFF_HAND)) return;
    if(!block.blockState.is(Block.getBlock("minecraft:grass_block"))) return
    if(!player.crouching) return;
    if(!item.empty) return;
    player.swing()
    block.popItemFromFace(Item.of("diamond"), facing)
})
signal knollBOT
#

You can modify recipe viewers with KubeJS, and the wiki has pages on them!

scarlet hatch
#

THANKSSS

final jacinth
unreal musk
#

?

final jacinth
#

It could be shorter.