Optional
entityOptions: IEntityConstructorOptions<CreatureType>Optional
aberrant: booleanProtected
Optional
_descriptionOptional
aberrantOptional
allowUsed for smart vehicle movement (minecarts) Note: This is clientside only.
Optional
attackUsed for attack animations. Note: This is clientside only.
undefined = Vector2.ZERO for this
Optional
enemyOptional
breakundefined = Direction.None for this
Note: This might not be a whole number.
Note: This might not be a whole number.
Optional
historicalOptional
hitchedOptional
isNot guaranteed to be synced between the server and client for Human entities
Optional
moveOptional
movementOnly used for Human entities
Readonly
movingUsed for movement animations. Note: This is clientside only.
Optional
originalOptional
ownerNotifier marker assigned to this entity
Optional
preventOptional
referenceDo not use this property directly, instead use `game.references.getReference()
Optional
renamedOptional
respawnedOptional
shouldProtected
Optional
shouldProtected
Optional
slippingReadonly
statOptional
zoneundefined
if this entity's island is not loaded, this
if it is
Get the entities description
Whether this entity's island is loaded
Checks if the entity is within the viewport bounds of one or more humans
Returns the times a creature has been petted.
number if the creature has been petted (0 if it has never been petted).
Returns the times a creature has been tamed.
number if the creature has been tamed (0 if it has never been tamed).
Optional
fieldOfView: FieldOfViewOptional
customRadius: numberOptional
customRadius: numberOptional
fieldOfView: FieldOfViewOptional
customRadius: numberChecks that a creature can move to a certain tile and/or interact with doodads/tiles
0 if the creature can move, otherwise an error code
True if clientside. Don't do random stuff in this case
Set to true if the object is about to move to this tile. This method will confirm if theres an existing npc/creature there and return false if so
Optional
options: Partial<ICreatureCheckMoveOptions>Checks under the creature for getting burned, setting off traps, eating items off the ground, and more
Returns whether the creature can keep moving (in the case of creatures with >= 2 speed)
Optional
skipParticles: booleanOptional
creatureX: numberOptional
creatureY: numberOptional
creatureZ: numberProtected
getProtected
getCalled when filling out the entities description for the first time
Optional
article: ArticleWhether to include an article for the name of the creature. Uses the article rules on the language. Defaults to true
.
Optional
count: numberThe number of this creature that you're getting the name of. Defaults to 1
.
Examples:
creature.getName()
// "an acid spitter demon"creature.getName(false)
// "acid spitter demon"creature.getName(undefined, 3)
// "acid spitter demons"Gets the temperature produced by this object. Positive values are "heat", negative values are "cold".
Refer to the values of the Temperature
enum to see the possible range.
If this method is not implemented, or it returns undefined
, Temperature.Neutral
is used.
Returns the handler for this status effect, whether or not this entity currently has the effect.
Returns the handler for this status effect, whether or not this entity currently has the effect.
Returns whether the entity has the given StatusType
The status to check
Increases the creature's maximum health in the event of offering/re-taming and petting (to a lesser extent)
Protected
initializeMove the entity to the tile
Optional
options: IMoveToOptionsProtected
onProtected
onProtected
setProtected
setProtected
setOptional
toZ: numberOptional
options: IMoveToOptionsSets whether the entity has the given StatusType
.
Emits EntityEvent.StatusChange
.
The status to change
Whether the entity will have the status.
If given false/0, removes the status. If given true/1+, raises the status to the given level.
The reason for the change
Forces the status to be set to the given value, even if the current effect is being lowered.
Start slipping the entity
Faces in the direction
Faces the target tile
Start slipping if the tile is slippable. Stops slipping if above the max slip count or if the tile is not slippable.
Protected
updateUpdates the world renderer & flow field state for the tile
Optional
updateNeighbors: booleanOptional
skipFlowFieldUpdate: booleanStatic
isGenerated using TypeDoc
Entity class that includes stats/status system. Note: We're assuming something with stats is also movable!