Package dev.latvian.mods.kubejs.item
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 Summary
ConstructorsConstructorDescriptionItemClickedKubeEvent(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.item.ItemStack item) -
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.world.item.ItemStackdefaultExitValue(dev.latvian.mods.rhino.Context cx) net.minecraft.world.entity.player.Playerdev.latvian.mods.rhino.type.TypeInfonet.minecraft.world.InteractionHandgetHand()net.minecraft.world.item.ItemStackgetItem()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.latvian.mods.kubejs.entity.KubeEntityEvent
getLevelMethods inherited from interface dev.latvian.mods.kubejs.event.KubeEvent
afterPosted, cancel, cancel, exit, exit, mapExitValue, success, successMethods inherited from interface dev.latvian.mods.kubejs.level.KubeLevelEvent
getRegistries, getServerMethods inherited from interface dev.latvian.mods.kubejs.player.KubePlayerEvent
getPlayer
-
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:
getEntityin interfaceKubeEntityEvent- Specified by:
getEntityin interfaceKubeLivingEntityEvent- Specified by:
getEntityin interfaceKubePlayerEvent
-
getHand
@Info("The hand that the item was clicked with.") public net.minecraft.world.InteractionHand getHand() -
getItem
-
getTarget
-
defaultExitValue
@Nullable public @Nullable net.minecraft.world.item.ItemStack defaultExitValue(dev.latvian.mods.rhino.Context cx) - Specified by:
defaultExitValuein interfaceKubeEvent
-
getExitValueType
@HideFromJS public dev.latvian.mods.rhino.type.TypeInfo getExitValueType()- Specified by:
getExitValueTypein interfaceKubeEvent
-