ArrowNockEvent
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.neoforge.api.event.entity.arrow.ArrowNockEvent;
Extends
ArrowNockEvent extends PlayerEvent
.
Implements
ArrowNockEvent
implements the following interfaces:
Listening to the event
This event can be listened to like so:
events.register<crafttweaker.neoforge.api.event.entity.arrow.ArrowNockEvent>(event => { println("ArrowNockEvent ran!");});
Members
Getter
event.action
Return Type:
InteractionResultHolder<IItemStack>
Setter
event.action = myInteractionResultHolder;
Parameters:
action: InteractionResultHolder<IItemStack>
Type: InteractionResultHolder<IItemStack>
Getter
// ArrowNockEvent.ammo as boolevent.ammo
Return Type:
bool
Getter
// ArrowNockEvent.bow as IItemStackevent.bow
Return Type:
IItemStack
cancel()
Cancels the event. Same as script.zs
setCanceled(true)
// ArrowNockEvent.cancel();event.cancel();
Getter
// ArrowNockEvent.canceled as boolevent.canceled
Return Type:
bool
Setter
// ArrowNockEvent.canceled = (cancel as bool);event.canceled = myBool;
Parameters:
cancel: bool
Type: bool
canceled() as bool
// ArrowNockEvent.canceled() as bool;event.canceled();
Return Type:
bool
canceled(cancel as bool)
// ArrowNockEvent.canceled(cancel as bool);event.canceled(myBool);
Parameters:
cancel: bool
Type: bool
Getter
Getter
// ArrowNockEvent.entity as LivingEntityevent.entity
Return Type:
LivingEntity
Getter
Getter
// ArrowNockEvent.hand as InteractionHandevent.hand
Return Type:
InteractionHand