Package-level declarations

Types

Link copied to clipboard
interface BlockGrid

The blocks PlayerMotion moves through, looked up by coordinates. Implementations decide what unknown blocks are.

Link copied to clipboard

Elytra flight as the game moves it, one tick at a time.

Link copied to clipboard
class MotionTraits @JvmOverloads constructor(val walkingSpeed: Float, val jumpStrength: Float, val jumpBoostPower: Float, val mechanics: Mechanics = Mechanics.MODERN)

What sets how fast a player walks and how high it jumps; walkingSpeed is without sprinting. mechanics picks the game version's movement formula.

Link copied to clipboard

A player walking, sprinting, sneaking and jumping on land, tick for tick as LivingEntity.aiStep moves it. Fluids, climbing and slow falling are left out. Collisions come from terrain, so unlike SimulatedPlayer it runs off the game thread.

Link copied to clipboard

A prediction of where a player goes, advanced one game tick per tick.

Link copied to clipboard
class SimulatedArrow(blocks: BlockGetter, entities: Level?, pos: Vec3, deltaMovement: Vec3)

An arrow flying from pos at deltaMovement as AbstractArrow moves it, until it hits a block of blocks or one of entities, when given. The level stays untouched.

Link copied to clipboard
class SimulatedInput @JvmOverloads constructor(val keys: Input, var forceStayOnGroundSurface: Boolean = false, var ignoresEdgeBackOff: Boolean = false)

The keys a SimulatedPlayer holds, as the client's keyboard input turns them into movement.

Link copied to clipboard
interface SimulationHooks

How a host changes the movement of its own player, so a SimulatedPlayer of that player moves the same. Every default is vanilla; pass hooks only for the player the host changes.