#right click action
45 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
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")
})
i wil ltry <3
if i want to spawn an item i need to put what ?
and the script execut 2 time idk why
but thanks <3
and only on the grass_block possible... ?
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)
})
ive put exactly this one
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)
})
this is the same as before
how is it the same
same as this one
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)
})
thanks
you
so
much
❤️
is there a way to put 25% of luck that i can get the item ?
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)
})
what's lychee
Then what do you mean with lychee
like the same thing but lychee show it in jei / rei and the arm moving when right clicking
then why don't you just use lychee
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
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)
})
You can modify recipe viewers with KubeJS, and the wiki has pages on them!
THANKSSS
BlockEvents.rightClicked((event) => {
const { player, item, hand, block, facing, level } = event;
if (level.random.nextFloat() > 0.25) return;
if (hand == "OFF_HAND") return;
if (block.id !== "minecraft:grass_block") return;
if (!player.crouching) return;
if (!item.empty) return;
player.swing();
block.popItemFromFace("diamond", facing);
});
?
It could be shorter.