Skip to main content

Module base

Module base 

Source
Expand description

Common base functionality shared by all entities.

EntityBase contains the core fields and methods that every entity needs. Entities embed this struct and delegate common Entity trait methods to it.

Re-exportsยง

pub use fire_freeze::EntityFireFreezeState;
pub use movement::EntityGroundContact;
pub use movement::EntityMovement;
pub use movement::EntityMovementEmission;
pub use movement::EntityMovementFlags;
pub use movement::EntityMovementProgress;
pub use movement::EntityVerticalMovementStateUpdate;
pub use persistence::EntityBaseLoad;
pub use persistence::EntityBaseSaveData;
pub use relationships::PendingWorldChangeToken;

Modulesยง

fire_freeze ๐Ÿ”’
movement ๐Ÿ”’
persistence ๐Ÿ”’
relationships ๐Ÿ”’

Structsยง

EntityAmethystStepSound
Sound parameters for vanilla amethyst step chimes.
EntityBase
Common fields and methods shared by all entities.
EntityBaseState
Vanilla Entity movement state stored as one locked snapshot.
EntityMovementTrace ๐Ÿ”’
EntityPhysicsStateInput ๐Ÿ”’
EntityPistonMovement ๐Ÿ”’
Per-tick piston movement accumulated by vanilla Entity.limitPistonMovement.

Constantsยง

DEFAULT_MAX_AIR_SUPPLY
Default vanilla Entity.getMaxAirSupply value.
DEFAULT_TICKS_REQUIRED_TO_FREEZE
Default vanilla Entity.getTicksRequiredToFreeze value.
FIRE_IGNITE_TICKS ๐Ÿ”’
LAVA_IGNITE_TICKS ๐Ÿ”’
MAX_ENTITY_TAGS
Vanilla scoreboard tag limit for a single entity.
MOVEMENT_TRACE_LIMIT ๐Ÿ”’
MOVEMENT_TRACE_POSITION_EPSILON_SQ ๐Ÿ”’
PISTON_APPLIED_MOVEMENT_EPSILON ๐Ÿ”’
PISTON_MOVEMENT_LIMIT ๐Ÿ”’
PISTON_ZERO_MOVEMENT_EPSILON ๐Ÿ”’
STUCK_SPEED_MULTIPLIER_EPSILON ๐Ÿ”’

Functionsยง

normalize_rotation ๐Ÿ”’
require_finite_position ๐Ÿ”’