Documentation
¶
Index ¶
- type Config
- type Game
- func (g *Game) CurrentTick() uint64
- func (g *Game) End()
- func (g *Game) HandleAttackEntity(ctx *player.Context, e world.Entity, force *float64, height *float64, ...)
- func (g *Game) HandleBlockBreak(ctx *player.Context, pos cube.Pos, drops *[]item.Stack, xp *int)
- func (g *Game) HandleBlockPlace(ctx *player.Context, pos cube.Pos, b world.Block)
- func (g *Game) HandleDrop(ctx *inventory.Context, slot int, stack item.Stack)
- func (g *Game) HandleFoodLoss(ctx *player.Context, from int, to *int)
- func (g *Game) HandleHeal(ctx *player.Context, health *float64, src world.HealingSource)
- func (g *Game) HandleHurt(ctx *player.Context, damage *float64, immune bool, immunity *time.Duration, ...)
- func (g *Game) HandleItemPickup(ctx *player.Context, i *item.Stack)
- func (g *Game) HandleItemUse(ctx *player.Context)
- func (g *Game) HandleItemUseOnEntity(ctx *player.Context, e world.Entity)
- func (g *Game) HandleMove(ctx *player.Context, pos mgl64.Vec3, rot cube.Rotation)
- func (g *Game) HandlePlace(ctx *inventory.Context, slot int, stack item.Stack)
- func (g *Game) HandleTake(ctx *inventory.Context, slot int, stack item.Stack)
- func (g *Game) ID() string
- func (g *Game) IsBlockPlaced(pos cube.Pos) bool
- func (g *Game) IsEnding() bool
- func (g *Game) IsPlaying() bool
- func (g *Game) IsWaiting() bool
- func (g *Game) Join(p *player.Player) error
- func (g *Game) Load() error
- func (g *Game) Messaget(translationName string, args ...any)
- func (g *Game) OnTick()
- func (g *Game) ParticipantByXUID(xuid string) (igame.IParticipant, bool)
- func (g *Game) Participants() map[string]igame.IParticipant
- func (g *Game) Players(tx *world.Tx) []*player.Player
- func (g *Game) PlayingParticipants() map[string]igame.IParticipant
- func (g *Game) Quit(p *player.Player) error
- func (g *Game) RemovePlacedBlock(pos cube.Pos)
- func (g *Game) SetCloseHook(hook func())
- func (g *Game) SetDuelRequestMode(b bool)
- func (g *Game) SetPlayAgainHook(hook func(p *player.Player) error)
- func (g *Game) SetSpectator(p *player.Player)
- func (g *Game) Sound(name string)
- func (g *Game) SpectatingParticipants() map[string]igame.IParticipant
- func (g *Game) Start()
- func (g *Game) State() State
- func (g *Game) Stop()
- func (g *Game) StorePlacedBlock(pos cube.Pos)
- func (g *Game) World() *world.World
- type Participant
- type ParticipantState
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
func (*Game) CurrentTick ¶
func (*Game) HandleAttackEntity ¶
func (*Game) HandleBlockBreak ¶
func (*Game) HandleBlockPlace ¶
func (*Game) HandleDrop ¶
func (*Game) HandleHeal ¶
func (*Game) HandleHurt ¶
func (*Game) HandleItemUse ¶
func (*Game) HandleItemUseOnEntity ¶
func (*Game) HandleMove ¶
func (*Game) HandlePlace ¶
func (*Game) HandleTake ¶
func (*Game) ParticipantByXUID ¶
func (g *Game) ParticipantByXUID(xuid string) (igame.IParticipant, bool)
func (*Game) Participants ¶
func (g *Game) Participants() map[string]igame.IParticipant
func (*Game) PlayingParticipants ¶
func (g *Game) PlayingParticipants() map[string]igame.IParticipant
func (*Game) RemovePlacedBlock ¶
func (*Game) SetCloseHook ¶
func (g *Game) SetCloseHook(hook func())
func (*Game) SetDuelRequestMode ¶
func (*Game) SetSpectator ¶
func (*Game) SpectatingParticipants ¶
func (g *Game) SpectatingParticipants() map[string]igame.IParticipant
func (*Game) StorePlacedBlock ¶
type Participant ¶
type Participant struct {
// contains filtered or unexported fields
}
func (*Participant) IsPlaying ¶
func (p *Participant) IsPlaying() bool
func (*Participant) IsSpectating ¶
func (p *Participant) IsSpectating() bool
func (*Participant) PearlCooldown ¶
func (p *Participant) PearlCooldown() time.Time
func (*Participant) SetPearlCooldown ¶
func (p *Participant) SetPearlCooldown(d time.Time)
func (*Participant) User ¶
func (p *Participant) User() igame.User
func (*Participant) XUID ¶
func (p *Participant) XUID() string
type ParticipantState ¶
type ParticipantState int
const ( ParticipantStatePlaying ParticipantState = iota ParticipantStateSpectating )
Click to show internal directories.
Click to hide internal directories.