EntityInteractSpecificEvent
Link to entityinteractspecificevent
This event is fired on both sides whenever a player right-clicks an entity.
"Interact at" is an interact where the local vector (which part of the entity you clicked) is known. The state of this event affects whether Entity#interactAt(Player, Vec3, InteractionHand) is called.
The event is cancelable.
If the event is canceled, will cause the entity to not be interacted with
The event does not have a result.
Importing the class
Link to importing-the-class
Importing the class is recommended for events, simply add this line to the top of your script file.
ZenScript Copyimport crafttweaker.neoforge.api.event.interact.EntityInteractSpecificEvent;
Listening to the event
Link to listening-to-the-event
ZenScript Copyevents.register<crafttweaker.neoforge.api.event.interact.EntityInteractSpecificEvent>(event => {
println("EntityInteractSpecificEvent ran!");
});
Supertype
Link to supertype
EntityInteractSpecificEvent extends PlayerInteractEvent. That means all methods available in PlayerInteractEvent are also available in EntityInteractSpecificEvent
Implemented Interfaces
Link to implemented-interfaces
EntityInteractSpecificEvent implements the following interfaces. That means all methods defined in these interfaces are also available in EntityInteractSpecificEvent
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name cancellationResult | Type InteractionResult | Has Getter true | Has Setter true |
Name localPos | Type Vec3 | Has Getter true | Has Setter false |
Name target | Type Entity | Has Getter true | Has Setter false |