Skip to main content

Module entity

Module entity 

Source
Expand description

The bus’s domains: each one’s actions as functions (world::get_block(dim, pos), entity::position(uuid), player::give_item(name, item, count)) beside its events. What happens to entities.

Modules§

combat
Entities hurt and hit.
game
Entities living in the game.
life
Entities appearing and dying.

Structs§

AddEffect
Gives the entity a mob effect.
AddVelocity
Adds to the entity’s velocity.
AttributeBase
An attribute’s base value.
AttributeValue
An attribute’s value with its modifiers.
ClearEffects
Takes every mob effect off the entity.
Damage
Hurts the entity.
Data
What the entity keeps under key.
DataValue
Bytes a mod keeps on an entity under a key.
Dismount
Gets the entity off what it rides.
Hanging
How a hanging entity hangs: on which side, how big, and the item it was placed from (what it drops) — its entity data yog:hanging (yog_ids::yog::HANGING), which the host keeps up to date.
Health
A living entity’s health.
Info
The entity’s state.
Kill
Kills the entity.
Mount
Makes rider ride vehicle.
Nbt
The entity’s data as SNBT.
Passengers
The uuids riding the entity.
Position
The entity’s position.
RemoveEffect
Takes a mob effect off the entity.
Rotation
Which way the entity faces.
SetAttributeBase
Sets an attribute’s base value.
SetData
Keeps value under key (None forgets it), synced to the clients that see the entity; persist saves it with the entity.
SetDimensions
The entity’s size, [width, height, eye height] — None: vanilla’s — on the server and on every client that sees it.
SetFallDistance
Sets how far the entity has fallen.
SetFireTicks
Sets the entity on fire for ticks.
SetHealth
Sets a living entity’s health.
SetNbt
Merges snbt into the entity’s data.
SetVelocity
Sets the entity’s velocity.
Spawn
Spawns an entity of entity_type; its uuid.
Teleport
Moves the entity in its dimension.
TeleportToDim
Moves the entity to pos in dim.
Vehicle
The uuid of what the entity rides.
Velocity
The entity’s velocity.

Constants§

VANILLA_SIZE
What the host reads as “vanilla’s size again”: a negative width.

Functions§

add_effect
Gives the entity a mob effect.
add_velocity
Adds to the entity’s velocity.
attribute_base
An attribute’s base value.
attribute_value
An attribute’s value with its modifiers.
clear_effects
Takes every mob effect off the entity.
damage
Hurts the entity.
dismount
Gets the entity off what it rides.
health
A living entity’s health.
info
The entity’s state.
kill
Kills the entity.
mount
Makes rider ride vehicle.
nbt
The entity’s data as SNBT.
passengers
The uuids riding the entity.
position
The entity’s position.
remove_effect
Takes a mob effect off the entity.
rotation
Which way the entity faces.
set_attribute_base
Sets an attribute’s base value.
set_fall_distance
Sets how far the entity has fallen.
set_fire_ticks
Sets the entity on fire for ticks.
set_health
Sets a living entity’s health.
set_nbt
Merges snbt into the entity’s data.
set_velocity
Sets the entity’s velocity.
spawn
Spawns an entity of entity_type; its uuid.
teleport
Moves the entity in its dimension.
teleport_to_dim
Moves the entity to pos in dim.
vehicle
The uuid of what the entity rides.
velocity
The entity’s velocity.