Class ItemClickedKubeEvent

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

@Info("Invoked when a player right clicks with an item **without targeting anything**.\n\nNot to be confused with `BlockEvents.rightClick` or `ItemEvents.entityInteracted`.\n") public class ItemClickedKubeEvent extends Object implements KubePlayerEvent
  • Constructor Details

    • ItemClickedKubeEvent

      public ItemClickedKubeEvent(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.item.ItemStack item)
  • Method Details

    • getEntity

      @Info("The player that clicked with the item.") 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
    • getHand

      @Info("The hand that the item was clicked with.") public net.minecraft.world.InteractionHand getHand()
    • getItem

      @Info("The item that was clicked with.") public net.minecraft.world.item.ItemStack getItem()
    • getTarget

      @Info("The ray trace result of the click.") public KubeRayTraceResult getTarget()
    • defaultExitValue

      @Nullable public @Nullable net.minecraft.world.item.ItemStack defaultExitValue(dev.latvian.mods.rhino.Context cx)
      Specified by:
      defaultExitValue in interface KubeEvent
    • getExitValueType

      @HideFromJS public dev.latvian.mods.rhino.type.TypeInfo getExitValueType()
      Specified by:
      getExitValueType in interface KubeEvent