Class BlockRightClickedKubeEvent

java.lang.Object
dev.latvian.mods.kubejs.block.BlockRightClickedKubeEvent
All Implemented Interfaces:
KubeEntityEvent, KubeLivingEntityEvent, KubeEvent, KubeLevelEvent, KubePlayerEvent

@Info("Invoked when a player right clicks on a block.\n") public class BlockRightClickedKubeEvent extends Object implements KubePlayerEvent
  • Constructor Details

    • BlockRightClickedKubeEvent

      public BlockRightClickedKubeEvent(net.minecraft.world.item.ItemStack item, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction, @Nullable @Nullable net.minecraft.world.phys.BlockHitResult hitResult)
  • Method Details

    • getEntity

      @Info("The player that right clicked the block.") public net.minecraft.world.entity.player.Player getEntity()
      Specified by:
      getEntity in interface KubeEntityEvent
      Specified by:
      getEntity in interface KubeLivingEntityEvent
      Specified by:
      getEntity in interface KubePlayerEvent
    • getBlock

      @Info("The block that was right clicked.") public LevelBlock getBlock()
    • getHand

      @Info("The hand that was used to right click the block.") public net.minecraft.world.InteractionHand getHand()
    • getItem

      @Info("The position of the block that was right clicked.") public net.minecraft.world.item.ItemStack getItem()
    • getFacing

      @Info("The face of the block being right clicked.") public net.minecraft.core.Direction getFacing()
    • getHitResult

      @Nullable public @Nullable net.minecraft.world.phys.BlockHitResult getHitResult()