Home > server > BaseEntityController
A base class for entity controller implementations.
Signature:
export default abstract class BaseEntityController extends EventRouter Extends: EventRouter
The BaseEntityController should be extended by a more specific entity controller that you or a plugin implements. Entity controllers are intended to be used as one controller instance per entity, but are flexible enough for edge cases such as if you want to create niche behavior of one controller for many entities that behave in unison.
This class is an EventRouter, and instances of it emit events with payloads listed under BaseEntityControllerEventPayloads
|
Method |
Modifiers |
Description |
|---|---|---|
|
Override this method to handle the attachment of an entity to your entity controller. | ||
|
Override this method to handle the despawn of an entity from your entity controller. | ||
|
Override this method to handle the detachment of an entity from your entity controller. | ||
|
Override this method to handle the spawning of an entity to your entity controller. | ||
|
Override this method to handle entity movements based on your entity controller. | ||
|
tickWithPlayerInput(entity, input, cameraOrientation, deltaTimeMs) |
Override this method to handle entity movements based on player input for your entity controller. This is called every tick by a PlayerEntity with a entity controller. |