Package-level declarations
General extensions for entities
Properties
Returns a unit-vector pointing in the direction the entity is looking.
Shortcut property accessor for ServerPlayer.serverLevel.
Returns an instance of BlockInfo of the block the entity is currently standing on or swimming in, else it will be the BlockInfo of air - use touchedBlockNoAir if you don't need any info about air.
Does the same as touchedBlock, but returns null if the block is air.
Functions
Correctly handles teleports for all kinds of entities. Differentiates between ServerPlayer, LivingEntity and Entity and calls the correct function for each of them. Handles ServerLevel and direction changes.
Executes the given command for this player.
Schedules all necessary updates. Packets will be sent to the players to inform them about the new velocity.
Changes the velocity of this Entity using the given mutation logic in block. After that, markVelocityDirty is called.
Sets the Entitys velocity to vec and calls markVelocityDirty.
Changes the velocity of this Entity and calls markVelocityDirty.