InteractionComponent

This class handles left click, right click, and hitbox contact events for the entity. Certain types of entities may have default behaviors for these events, which can be overriden by setting custom callbacks.

Constructors

Link copied to clipboard
public void InteractionComponent(ModeledEntity modeledEntity)

Types

Link copied to clipboard
public class InteractionComponentEvents implements Listener

Functions

Link copied to clipboard
protected void callHitboxContactEvent(Player player)
Fires the ModeledEntityHitboxContactEvent for this entity on the primary thread.
Link copied to clipboard
public void callLeftClickEvent(Player player)
Link copied to clipboard
public void callModeledEntityHitByProjectileEvent(Projectile projectile)
Fires the ModeledEntityHitByProjectileEvent for this entity on the primary thread.
Link copied to clipboard
public boolean callNativeBackingLeftClickEvent(Player player)
Fires the same public left-click event for a hit on a model's vanilla backing entity without recursively attacking that entity again.
Link copied to clipboard
public void callRightClickEvent(Player player)
Link copied to clipboard
public void clearCallbacks()
Link copied to clipboard
public void handleHitboxContactEvent(Player player)
Link copied to clipboard
public void handleLeftClickEvent(Player player)
Link copied to clipboard
public void handleModeledEntityHitByProjectileEvent(Projectile projectile)
Link copied to clipboard
public void handleRightClickEvent(Player player)
Link copied to clipboard
Link copied to clipboard
public void setLeftClickCallback(ModeledEntityLeftClickCallback leftClickCallback)
Link copied to clipboard
Link copied to clipboard
public void setRightClickCallback(ModeledEntityRightClickCallback rightClickCallback)