Help us shape the future of Go! Take the 2026 Go Developer Survey

replay

package module
v0.0.0-...-d66dee8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 31 Imported by: 0

README

df-replay

A dragonfly library to replay and record actions.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init should be called after items, blocks, and entities are registered. We don't use go init() because we want to control the order of initialization.

func NewRecorderViewer

func NewRecorderViewer(r *Recorder) world.Viewer

Types

type Data

type Data struct {
	// contains filtered or unexported fields
}

func NewData

func NewData(id uuid.UUID) *Data

func (*Data) LoadActions

func (d *Data) LoadActions(r io.Reader) error

type Entity

type Entity struct {
	// contains filtered or unexported fields
}

type Playback

type Playback struct {
	// contains filtered or unexported fields
}

Playback handles the playback of recorded actions.

func NewPlayback

func NewPlayback(w *world.World, data *Data) *Playback

NewPlayback creates a new playback instance with the given world and data.

func (*Playback) AddParticle

func (w *Playback) AddParticle(tx *world.Tx, pos mgl64.Vec3, p world.Particle)

func (*Playback) Block

func (w *Playback) Block(tx *world.Tx, pos cube.Pos) world.Block

func (*Playback) ChestState

func (w *Playback) ChestState(_ *world.Tx, pos cube.Pos) bool

func (*Playback) Close

func (w *Playback) Close()

Close stops the playback and releases resources.

func (*Playback) ContinueCrackBlock

func (w *Playback) ContinueCrackBlock(tx *world.Tx, pos cube.Pos, duration time.Duration)

func (*Playback) DespawnEntity

func (w *Playback) DespawnEntity(tx *world.Tx, id uint32)

func (*Playback) DespawnPlayer

func (w *Playback) DespawnPlayer(tx *world.Tx, id uint32)

func (*Playback) DoArrowShake

func (w *Playback) DoArrowShake(tx *world.Tx, id uint32)

func (*Playback) DoFireworkExplosion

func (w *Playback) DoFireworkExplosion(tx *world.Tx, id uint32)

func (*Playback) DoPlayerCriticalHit

func (w *Playback) DoPlayerCriticalHit(tx *world.Tx, id uint32)

func (*Playback) DoPlayerEating

func (w *Playback) DoPlayerEating(tx *world.Tx, id uint32)

func (*Playback) DoPlayerEnchantedHit

func (w *Playback) DoPlayerEnchantedHit(tx *world.Tx, id uint32)

func (*Playback) DoPlayerHurt

func (w *Playback) DoPlayerHurt(tx *world.Tx, id uint32)

func (*Playback) DoPlayerSwingArm

func (w *Playback) DoPlayerSwingArm(tx *world.Tx, id uint32)

func (*Playback) DoPlayerTotemUse

func (w *Playback) DoPlayerTotemUse(tx *world.Tx, id uint32)

func (*Playback) Duration

func (w *Playback) Duration() time.Duration

Duration returns the duration of the playback.

func (*Playback) Emote

func (w *Playback) Emote(tx *world.Tx, id uint32, emoteId uuid.UUID)

func (*Playback) Entity

func (w *Playback) Entity(id uint32) (*Entity, bool)

Entity returns an entity by its ID. If the entity does not exist, the second return value will be false.

func (*Playback) EntityExtraData

func (w *Playback) EntityExtraData(id uint32) (map[string]any, bool)

func (*Playback) EntityIdentifier

func (w *Playback) EntityIdentifier(id uint32) (string, bool)

func (*Playback) EntityNameTag

func (w *Playback) EntityNameTag(tx *world.Tx, id uint32) string

func (*Playback) EntityPosition

func (w *Playback) EntityPosition(tx *world.Tx, id uint32) (mgl64.Vec3, bool)

func (*Playback) EntityRotation

func (w *Playback) EntityRotation(tx *world.Tx, id uint32) (cube.Rotation, bool)

func (*Playback) FastForward

func (w *Playback) FastForward(tx *world.Tx, ticks int)

FastForward moves the playback forward by the given number of ticks.

func (*Playback) Liquid

func (w *Playback) Liquid(tx *world.Tx, pos cube.Pos) (world.Liquid, bool)

func (*Playback) MaxPlaybackTick

func (w *Playback) MaxPlaybackTick() int

MaxPlaybackTick returns the maximum tick of the playback.

func (*Playback) MoveEntity

func (w *Playback) MoveEntity(tx *world.Tx, id uint32, pos mgl64.Vec3, rot cube.Rotation)

func (*Playback) MovePlayer

func (w *Playback) MovePlayer(tx *world.Tx, id uint32, pos mgl64.Vec3, rot cube.Rotation)

func (*Playback) Pause

func (w *Playback) Pause()

Pause pauses the playback.

func (*Playback) Paused

func (w *Playback) Paused() bool

Paused returns true if the playback is paused.

func (*Playback) Play

func (w *Playback) Play()

Play starts the playback.

func (*Playback) PlaySound

func (w *Playback) PlaySound(tx *world.Tx, pos mgl64.Vec3, s world.Sound)

func (*Playback) PlaybackTick

func (w *Playback) PlaybackTick() int

PlaybackTick returns the current tick of the playback.

func (*Playback) Player

func (w *Playback) Player(id uint32) (*Player, bool)

Player returns a player by its ID. If the player does not exist, the second return value will be false.

func (*Playback) PlayerArmourItems

func (w *Playback) PlayerArmourItems(tx *world.Tx, id uint32) (helmet, chestplate, leggings, boots item.Stack, ok bool)

func (*Playback) PlayerArmours

func (w *Playback) PlayerArmours(tx *world.Tx, id uint32) (helmet, chestplate, leggings, boots item.Stack, ok bool)

func (*Playback) PlayerByName

func (w *Playback) PlayerByName(name string) (*Player, bool)

PlayerByName returns a player by its name. If the player does not exist, the second return value will be false.

func (*Playback) PlayerCrawling

func (w *Playback) PlayerCrawling(tx *world.Tx, id uint32) bool

func (*Playback) PlayerGliding

func (w *Playback) PlayerGliding(tx *world.Tx, id uint32) bool

func (*Playback) PlayerHeldItems

func (w *Playback) PlayerHeldItems(tx *world.Tx, id uint32) (mainHand, offHand item.Stack, ok bool)

func (*Playback) PlayerName

func (w *Playback) PlayerName(id uint32) string

func (*Playback) PlayerNameTag

func (w *Playback) PlayerNameTag(tx *world.Tx, id uint32) string

func (*Playback) PlayerOnFire

func (w *Playback) PlayerOnFire(tx *world.Tx, id uint32) bool

PlayerOnFire returns whether the player with the given ID is on fire.

func (*Playback) PlayerPosition

func (w *Playback) PlayerPosition(tx *world.Tx, id uint32) (mgl64.Vec3, bool)

func (*Playback) PlayerRotation

func (w *Playback) PlayerRotation(tx *world.Tx, id uint32) (cube.Rotation, bool)

func (*Playback) PlayerSkin

func (w *Playback) PlayerSkin(id uint32) (skin.Skin, bool)

func (*Playback) PlayerSneaking

func (w *Playback) PlayerSneaking(tx *world.Tx, id uint32) bool

func (*Playback) PlayerSprinting

func (w *Playback) PlayerSprinting(tx *world.Tx, id uint32) bool

func (*Playback) PlayerSwimming

func (w *Playback) PlayerSwimming(tx *world.Tx, id uint32) bool

func (*Playback) PlayerUsingItem

func (w *Playback) PlayerUsingItem(tx *world.Tx, id uint32) bool

func (*Playback) PlayerVisible

func (w *Playback) PlayerVisible(tx *world.Tx, id uint32) bool

func (*Playback) PlayerVisibleEffects

func (w *Playback) PlayerVisibleEffects(tx *world.Tx, id uint32) ([]int, bool)

func (*Playback) Players

func (w *Playback) Players() []*Player

Players ...

func (*Playback) Resume

func (w *Playback) Resume()

Resume resumes the playback.

func (*Playback) Reversed

func (w *Playback) Reversed() bool

Reversed returns true if the playback is in reverse.

func (*Playback) Rewind

func (w *Playback) Rewind(tx *world.Tx, ticks int)

Rewind moves the playback backward by the given number of ticks.

func (*Playback) SetBlock

func (w *Playback) SetBlock(tx *world.Tx, pos cube.Pos, b world.Block)

func (*Playback) SetEntityNameTag

func (w *Playback) SetEntityNameTag(tx *world.Tx, id uint32, nameTag string)

func (*Playback) SetLiquid

func (w *Playback) SetLiquid(tx *world.Tx, pos cube.Pos, l world.Liquid)

func (*Playback) SetPlayerCrawling

func (w *Playback) SetPlayerCrawling(tx *world.Tx, id uint32, crawling bool)

func (*Playback) SetPlayerGliding

func (w *Playback) SetPlayerGliding(tx *world.Tx, id uint32, gliding bool)

func (*Playback) SetPlayerNameTag

func (w *Playback) SetPlayerNameTag(tx *world.Tx, id uint32, nameTag string)

func (*Playback) SetPlayerOnFire

func (w *Playback) SetPlayerOnFire(tx *world.Tx, id uint32, onFire bool)

SetPlayerOnFire sets whether the player with the given ID is on fire.

func (*Playback) SetPlayerSneaking

func (w *Playback) SetPlayerSneaking(tx *world.Tx, id uint32, sneaking bool)

func (*Playback) SetPlayerSprinting

func (w *Playback) SetPlayerSprinting(tx *world.Tx, id uint32, sprinting bool)

func (*Playback) SetPlayerSwimming

func (w *Playback) SetPlayerSwimming(tx *world.Tx, id uint32, swimming bool)

func (*Playback) SetPlayerUsingItem

func (w *Playback) SetPlayerUsingItem(tx *world.Tx, id uint32, usingItem bool)

func (*Playback) SetPlayerVisibility

func (w *Playback) SetPlayerVisibility(tx *world.Tx, id uint32, visible bool)

func (*Playback) SetPlayerVisibleEffects

func (w *Playback) SetPlayerVisibleEffects(tx *world.Tx, id uint32, effectIDs []int)

func (*Playback) SetReverse

func (w *Playback) SetReverse(reverse bool)

SetReverse sets the playback to reverse. If reverse is true, the playback will play backwards. If false, the playback will play forwards.

func (*Playback) SetSpeed

func (w *Playback) SetSpeed(speed float64)

SetSpeed sets the playback speed. A value of 1.0 is normal speed, values greater than 1.0 are faster, and values less than 1.0 are slower. The speed must be greater than 0.

func (*Playback) SpawnEntity

func (w *Playback) SpawnEntity(tx *world.Tx, id uint32, identifier, nameTag string, pos mgl64.Vec3, rot cube.Rotation, extraData map[string]any)

func (*Playback) SpawnPlayer

func (w *Playback) SpawnPlayer(tx *world.Tx, username, nameTag string, id uint32, pos mgl64.Vec3, rot cube.Rotation, armour [4]item.Stack, heldItems [2]item.Stack)

func (*Playback) Speed

func (w *Playback) Speed() float64

Speed returns the current playback speed.

func (*Playback) StartCrackBlock

func (w *Playback) StartCrackBlock(tx *world.Tx, pos cube.Pos, duration time.Duration)

func (*Playback) StopCrackBlock

func (w *Playback) StopCrackBlock(tx *world.Tx, pos cube.Pos)

func (*Playback) Tick

func (w *Playback) Tick(tx *world.Tx)

Tick advances the playback by one tick, either forward or backward depending on the reverse setting.

func (*Playback) UpdateChestState

func (w *Playback) UpdateChestState(tx *world.Tx, pos cube.Pos, open bool)

func (*Playback) UpdatePlayerArmor

func (w *Playback) UpdatePlayerArmor(tx *world.Tx, id uint32, helmet, chestplate, leggings, boots item.Stack)

func (*Playback) UpdatePlayerArmours

func (w *Playback) UpdatePlayerArmours(tx *world.Tx, id uint32, helmet, chestplate, leggings, boots item.Stack)

func (*Playback) UpdatePlayerHeldItems

func (w *Playback) UpdatePlayerHeldItems(tx *world.Tx, id uint32, mainHand item.Stack, offHand item.Stack)

func (*Playback) UpdatePlayerSkin

func (w *Playback) UpdatePlayerSkin(tx *world.Tx, id uint32, skin skin.Skin)

type PlaybackPlayerHandler

type PlaybackPlayerHandler struct {
	player.NopHandler
	// contains filtered or unexported fields
}

func NewPlaybackPlayerHandler

func NewPlaybackPlayerHandler(w *Playback) *PlaybackPlayerHandler

NewPlaybackPlayerHandler ...

type Player

type Player struct {
	// contains filtered or unexported fields
}

func (*Player) ExecEntity

func (p *Player) ExecEntity(tx *world.Tx, fn func(*world.Tx, world.Entity)) bool

func (*Player) Name

func (p *Player) Name() string

type RecordPlayerHandler

type RecordPlayerHandler struct {
	player.NopHandler
	// contains filtered or unexported fields
}

func NewRecordPlayerHandler

func NewRecordPlayerHandler(r *Recorder) *RecordPlayerHandler

func (*RecordPlayerHandler) HandleAttackEntity

func (h *RecordPlayerHandler) HandleAttackEntity(ctx *player.Context, _ world.Entity, _, _ *float64, _ *bool)

func (*RecordPlayerHandler) HandleBlockBreak

func (h *RecordPlayerHandler) HandleBlockBreak(ctx *player.Context, pos cube.Pos, _ *[]item.Stack, _ *int)

func (*RecordPlayerHandler) HandleBlockPlace

func (h *RecordPlayerHandler) HandleBlockPlace(ctx *player.Context, pos cube.Pos, b world.Block)

func (*RecordPlayerHandler) HandleHeldSlotChange

func (h *RecordPlayerHandler) HandleHeldSlotChange(ctx *player.Context, _, to int)

func (*RecordPlayerHandler) HandleHurt

func (h *RecordPlayerHandler) HandleHurt(ctx *player.Context, _ *float64, _ bool, _ *time.Duration, _ world.DamageSource)

func (*RecordPlayerHandler) HandleItemConsume

func (h *RecordPlayerHandler) HandleItemConsume(ctx *player.Context, _ item.Stack)

func (*RecordPlayerHandler) HandleItemRelease

func (h *RecordPlayerHandler) HandleItemRelease(ctx *player.Context, _ item.Stack, _ time.Duration)

func (*RecordPlayerHandler) HandleItemUse

func (h *RecordPlayerHandler) HandleItemUse(ctx *player.Context)

func (*RecordPlayerHandler) HandleItemUseOnBlock

func (h *RecordPlayerHandler) HandleItemUseOnBlock(ctx *player.Context, pos cube.Pos, _ cube.Face, _ mgl64.Vec3)

func (*RecordPlayerHandler) HandleItemUseOnEntity

func (h *RecordPlayerHandler) HandleItemUseOnEntity(ctx *player.Context, _ world.Entity)

func (*RecordPlayerHandler) HandleMove

func (h *RecordPlayerHandler) HandleMove(ctx *player.Context, pos mgl64.Vec3, rot cube.Rotation)

func (*RecordPlayerHandler) HandlePunchAir

func (h *RecordPlayerHandler) HandlePunchAir(ctx *player.Context)

func (*RecordPlayerHandler) HandleSkinChange

func (h *RecordPlayerHandler) HandleSkinChange(ctx *player.Context, skin *skin.Skin)

func (*RecordPlayerHandler) HandleSwingArm

func (h *RecordPlayerHandler) HandleSwingArm(p *player.Player)

func (*RecordPlayerHandler) HandleTeleport

func (h *RecordPlayerHandler) HandleTeleport(ctx *player.Context, pos mgl64.Vec3)

func (*RecordPlayerHandler) HandleToggleSneak

func (h *RecordPlayerHandler) HandleToggleSneak(ctx *player.Context, sneaking bool)

type RecordWorldHandler

type RecordWorldHandler struct {
	world.NopHandler
	// contains filtered or unexported fields
}

func NewRecordWorldHandler

func NewRecordWorldHandler(r *Recorder) *RecordWorldHandler

func (*RecordWorldHandler) HandleCropTrample

func (h *RecordWorldHandler) HandleCropTrample(ctx *world.Context, pos cube.Pos)

func (*RecordWorldHandler) HandleEntityDespawn

func (h *RecordWorldHandler) HandleEntityDespawn(tx *world.Tx, e world.Entity)

func (*RecordWorldHandler) HandleEntitySpawn

func (h *RecordWorldHandler) HandleEntitySpawn(tx *world.Tx, e world.Entity)

func (*RecordWorldHandler) HandleExplosion

func (h *RecordWorldHandler) HandleExplosion(ctx *world.Context, _ mgl64.Vec3, _ *[]world.Entity, blocks *[]cube.Pos, _ *float64, _ *bool)

func (*RecordWorldHandler) HandleLeavesDecay

func (h *RecordWorldHandler) HandleLeavesDecay(ctx *world.Context, pos cube.Pos)

func (*RecordWorldHandler) HandleLiquidDecay

func (h *RecordWorldHandler) HandleLiquidDecay(ctx *world.Context, pos cube.Pos, before, after world.Liquid)

func (*RecordWorldHandler) HandleLiquidFlow

func (h *RecordWorldHandler) HandleLiquidFlow(ctx *world.Context, from, into cube.Pos, liquid world.Liquid, replaced world.Block)

func (*RecordWorldHandler) HandleLiquidHarden

func (h *RecordWorldHandler) HandleLiquidHarden(ctx *world.Context, hardenedPos cube.Pos, liquidHardened, otherLiquid, newBlock world.Block)

type Recorder

type Recorder struct {
	// contains filtered or unexported fields
}

Recorder ...

func NewRecorder

func NewRecorder(id uuid.UUID) *Recorder

NewRecorder creates a new recorder, returning a pointer to the recorder.

func NewRecorderWithoutEntityMovementRecording

func NewRecorderWithoutEntityMovementRecording(id uuid.UUID) *Recorder

NewRecorderWithoutEntityMovementRecording creates a new recorder that does not record entity movements.

func (*Recorder) AddEntity

func (r *Recorder) AddEntity(e world.Entity)

AddEntity ...

func (*Recorder) AddPlayer

func (r *Recorder) AddPlayer(p *player.Player)

AddPlayer ...

func (*Recorder) CloseAndSaveActions

func (r *Recorder) CloseAndSaveActions(w io.Writer) error

CloseAndSaveActions ...

func (*Recorder) EncodeItem

func (r *Recorder) EncodeItem(s item.Stack) action.Item

EncodeItem ...

func (*Recorder) EntityID

func (r *Recorder) EntityID(e world.Entity) uint32

EntityID ...

func (*Recorder) EntityIDByHandle

func (r *Recorder) EntityIDByHandle(h *world.EntityHandle) uint32

EntityIDByHandle ...

func (*Recorder) Flush

func (r *Recorder) Flush()

Flush flushes all pending actions to the buffer, writing them to the buffer.

func (*Recorder) PlayerID

func (r *Recorder) PlayerID(p *player.Player) uint32

PlayerID ...

func (*Recorder) PlayerIDByHandle

func (r *Recorder) PlayerIDByHandle(h *world.EntityHandle) uint32

PlayerIDByHandle ...

func (*Recorder) PushAction

func (r *Recorder) PushAction(a action.Action)

PushAction pushes an action to the recorder, to be written to the buffer at a later time.

func (*Recorder) PushBlockBreakParticle

func (r *Recorder) PushBlockBreakParticle(pos cube.Pos, b world.Block)

PushBlockBreakParticle ...

func (*Recorder) PushBlockBreakingSound

func (r *Recorder) PushBlockBreakingSound(pos cube.Pos, b world.Block)

PushBlockBreakingSound ...

func (*Recorder) PushBlockPlaceSound

func (r *Recorder) PushBlockPlaceSound(pos cube.Pos, b world.Block)

PushBlockPlaceSound ...

func (*Recorder) PushBlockPunchingParticle

func (r *Recorder) PushBlockPunchingParticle(pos cube.Pos, b world.Block, face cube.Face)

PushBlockPunchingParticle ...

func (*Recorder) PushBreakBlock

func (r *Recorder) PushBreakBlock(pos cube.Pos)

PushBreakBlock ...

func (*Recorder) PushChestUpdate

func (r *Recorder) PushChestUpdate(pos cube.Pos, open bool)

PushChestUpdate ...

func (*Recorder) PushContinueCrackBlock

func (r *Recorder) PushContinueCrackBlock(pos cube.Pos, dur time.Duration)

PushContinueCrackBlock ...

func (*Recorder) PushEmote

func (r *Recorder) PushEmote(p *player.Player, emote uuid.UUID)

PushEmote ...

func (*Recorder) PushEntityArrowShake

func (r *Recorder) PushEntityArrowShake(e world.Entity)

PushEntityArrowShake ...

func (*Recorder) PushEntityFireworkExplosion

func (r *Recorder) PushEntityFireworkExplosion(e world.Entity)

PushEntityFireworkExplosion ...

func (*Recorder) PushEntityMovement

func (r *Recorder) PushEntityMovement(e world.Entity, pos mgl64.Vec3, rot cube.Rotation)

PushEntityMovement ...

func (*Recorder) PushGeneralParticle

func (r *Recorder) PushGeneralParticle(pos mgl64.Vec3, p world.Particle) bool

PushGeneralParticle ...

func (*Recorder) PushGeneralSound

func (r *Recorder) PushGeneralSound(pos mgl64.Vec3, s world.Sound) bool

PushGeneralSound ...

func (*Recorder) PushLiquidSound

func (r *Recorder) PushLiquidSound(pos cube.Pos, l world.Liquid, isFill bool)

PushLiquidSound ...

func (*Recorder) PushPlaceBlock

func (r *Recorder) PushPlaceBlock(pos cube.Pos, b world.Block)

PushPlaceBlock ...

func (*Recorder) PushPlayerArmorChange

func (r *Recorder) PushPlayerArmorChange(p *player.Player)

PushPlayerArmorChange ...

func (*Recorder) PushPlayerCrawling

func (r *Recorder) PushPlayerCrawling(p *player.Player, crawling bool)

PushPlayerCrawling ...

func (*Recorder) PushPlayerCriticalHit

func (r *Recorder) PushPlayerCriticalHit(p *player.Player)

PushPlayerCriticalHit ...

func (*Recorder) PushPlayerEating

func (r *Recorder) PushPlayerEating(p *player.Player)

PushPlayerEating ...

func (*Recorder) PushPlayerEnchantedHit

func (r *Recorder) PushPlayerEnchantedHit(p *player.Player)

PushPlayerEnchantedHit ...

func (*Recorder) PushPlayerGliding

func (r *Recorder) PushPlayerGliding(p *player.Player, gliding bool)

PushPlayerGliding ...

func (*Recorder) PushPlayerHandChange

func (r *Recorder) PushPlayerHandChange(p *player.Player, mainHand, offHand item.Stack)

PushPlayerHandChange ...

func (*Recorder) PushPlayerHurt

func (r *Recorder) PushPlayerHurt(p *player.Player)

PushPlayerHurt ...

func (*Recorder) PushPlayerMovement

func (r *Recorder) PushPlayerMovement(p *player.Player, pos mgl64.Vec3, rot cube.Rotation)

PushPlayerMovement ...

func (*Recorder) PushPlayerOnFire

func (r *Recorder) PushPlayerOnFire(p *player.Player, onFire bool)

PushPlayerOnFire ...

func (*Recorder) PushPlayerSetVisibleEffects

func (r *Recorder) PushPlayerSetVisibleEffects(p *player.Player, effectIds []int)

PushPlayerSetVisibleEffects ...

func (*Recorder) PushPlayerSneaking

func (r *Recorder) PushPlayerSneaking(p *player.Player, sneaking bool)

PushPlayerSneaking ...

func (*Recorder) PushPlayerSprinting

func (r *Recorder) PushPlayerSprinting(p *player.Player, sprinting bool)

PushPlayerSprinting ...

func (*Recorder) PushPlayerSwimming

func (r *Recorder) PushPlayerSwimming(p *player.Player, swimming bool)

PushPlayerSwimming ...

func (*Recorder) PushPlayerSwingArm

func (r *Recorder) PushPlayerSwingArm(p *player.Player)

PushPlayerSwingArm ...

func (*Recorder) PushPlayerTotemUse

func (r *Recorder) PushPlayerTotemUse(p *player.Player)

PushPlayerTotemUse ...

func (*Recorder) PushPlayerUsingItem

func (r *Recorder) PushPlayerUsingItem(p *player.Player, usingItem bool)

PushPlayerUsingItem ...

func (*Recorder) PushPlayerVisibility

func (r *Recorder) PushPlayerVisibility(p *player.Player, visibility bool)

PushPlayerVisibility ...

func (*Recorder) PushSetBlock

func (r *Recorder) PushSetBlock(pos cube.Pos, b world.Block)

PushSetBlock ...

func (*Recorder) PushSetEntityNameTag

func (r *Recorder) PushSetEntityNameTag(e world.Entity, nameTag string)

PushSetEntityNameTag ...

func (*Recorder) PushSetLiquid

func (r *Recorder) PushSetLiquid(pos cube.Pos, l world.Liquid)

PushSetLiquid ...

func (*Recorder) PushSetPlayerNameTag

func (r *Recorder) PushSetPlayerNameTag(p *player.Player, nameTag string)

PushSetPlayerNameTag ...

func (*Recorder) PushSkinChange

func (r *Recorder) PushSkinChange(p *player.Player, sk skin.Skin)

PushSkinChange ...

func (*Recorder) PushStartCrackBlock

func (r *Recorder) PushStartCrackBlock(pos cube.Pos, dur time.Duration)

PushStartCrackBlock ...

func (*Recorder) PushStopCrackBlock

func (r *Recorder) PushStopCrackBlock(pos cube.Pos)

PushStopCrackBlock ...

func (*Recorder) RemoveEntity

func (r *Recorder) RemoveEntity(e world.Entity)

RemoveEntity ...

func (*Recorder) RemovePlayer

func (r *Recorder) RemovePlayer(p *player.Player)

RemovePlayer ...

func (*Recorder) SetPlayerSkin

func (r *Recorder) SetPlayerSkin(p *player.Player, sk skin.Skin)

SetPlayerSkin ...

func (*Recorder) StartTicking

func (r *Recorder) StartTicking(w *world.World)

StartTicking ...

type RecorderViewer

type RecorderViewer struct {
	world.NopViewer
	// contains filtered or unexported fields
}

func (*RecorderViewer) HideEntity

func (r *RecorderViewer) HideEntity(e world.Entity)

func (*RecorderViewer) ViewBlockAction

func (r *RecorderViewer) ViewBlockAction(pos cube.Pos, a world.BlockAction)

func (*RecorderViewer) ViewBlockUpdate

func (r *RecorderViewer) ViewBlockUpdate(pos cube.Pos, b world.Block, layer int)

func (*RecorderViewer) ViewEmote

func (r *RecorderViewer) ViewEmote(e world.Entity, emote uuid.UUID)

func (*RecorderViewer) ViewEntity

func (r *RecorderViewer) ViewEntity(e world.Entity)

func (*RecorderViewer) ViewEntityAction

func (r *RecorderViewer) ViewEntityAction(e world.Entity, a world.EntityAction)

func (*RecorderViewer) ViewEntityAnimation

func (r *RecorderViewer) ViewEntityAnimation(e world.Entity, a world.EntityAnimation)

func (*RecorderViewer) ViewEntityArmour

func (r *RecorderViewer) ViewEntityArmour(e world.Entity)

func (*RecorderViewer) ViewEntityGameMode

func (r *RecorderViewer) ViewEntityGameMode(e world.Entity)

func (*RecorderViewer) ViewEntityItems

func (r *RecorderViewer) ViewEntityItems(e world.Entity)

func (*RecorderViewer) ViewEntityMovement

func (r *RecorderViewer) ViewEntityMovement(e world.Entity, pos mgl64.Vec3, rot cube.Rotation, onGround bool)

func (*RecorderViewer) ViewEntityState

func (r *RecorderViewer) ViewEntityState(e world.Entity)

func (*RecorderViewer) ViewEntityTeleport

func (r *RecorderViewer) ViewEntityTeleport(e world.Entity, pos mgl64.Vec3)

func (*RecorderViewer) ViewParticle

func (r *RecorderViewer) ViewParticle(pos mgl64.Vec3, p world.Particle)

func (*RecorderViewer) ViewSkin

func (r *RecorderViewer) ViewSkin(e world.Entity)

func (*RecorderViewer) ViewSound

func (r *RecorderViewer) ViewSound(pos mgl64.Vec3, s world.Sound)

type WorldEntityMovementRecorder

type WorldEntityMovementRecorder struct {
	// contains filtered or unexported fields
}

func (*WorldEntityMovementRecorder) StartTicking

func (r *WorldEntityMovementRecorder) StartTicking()

StartTicking ...

func (*WorldEntityMovementRecorder) Tick

func (r *WorldEntityMovementRecorder) Tick(tx *world.Tx)

Tick ...

Directories

Path Synopsis
example
playback command
recording command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL