Package-level declarations

Types

Link copied to clipboard
class FallingPlayer @JvmOverloads constructor(player: Player, input: SimulatedInput, continuesTick: Boolean, hooks: SimulationHooks = SimulationHooks.VANILLA, motion: Vec3 = player.deltaMovement, yRot: Float = player.yRot)

Follows player holding input, without jumping, until it lands. It starts with motion and moves facing yRot; continuesTick and hooks are as for SimulatedPlayer.fromPlayer.

Link copied to clipboard
class Forecast(player: SimulatedPlayer)

The coming ticks of player, simulated when first asked for and kept, so every reader in a tick shares one simulation. Tick 0 is the player as it was handed over; the forecast ticks player itself, nothing else may. Safe to read from several threads.

Link copied to clipboard
class Forecasts

The Forecasts of players whose keys this side does not know, each made once with the keys SimulatedInput.guess reads from its last move. They hold until clear, which the host calls every tick once the players moved on.

Link copied to clipboard
data class PlayerSnapshot(val pos: Vec3, val fallDistance: Double, val deltaMovement: Vec3, val onGround: Boolean, val hasBackedOffEdge: Boolean)

A SimulatedPlayer after one of its ticks. hasBackedOffEdge tells that sneaking or safe walk would have held it back at a ledge in that tick.

Link copied to clipboard
fun interface PositionExtrapolation

Where something is in a number of ticks, which may be a fraction.

Link copied to clipboard
class SimulatedPlayer : Player, PlayerSimulation.Steered

A vanilla player entity that is never added to a level and moves through the real one with a fixed input.