helper

package
v0.0.0-...-205331c Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearAllPlayerInv

func ClearAllPlayerInv(p *player.Player)

func CopyDir

func CopyDir(src, dst string) error

CopyDir copies a directory and its contents recursively.

func CopyFile

func CopyFile(src, dst string) error

CopyFile copies a single file from src to dst.

func FormatTime

func FormatTime(seconds int) string

func InvalidPlayerCtxWorld

func InvalidPlayerCtxWorld(ctx *player.Context, w *world.World) bool

func IsItemUnbreakable

func IsItemUnbreakable(stack item.Stack) bool

func LogErrors

func LogErrors(a ...any)

func Mgl64Vec3ToMgl32Vec3

func Mgl64Vec3ToMgl32Vec3(v mgl64.Vec3) mgl32.Vec3

func RemoveDir

func RemoveDir(dir string) error

RemoveDir removes a directory and its contents recursively.

func ResetPlayer

func ResetPlayer(p *player.Player)

func ResetPlayerAttributes

func ResetPlayerAttributes(p *player.Player)

func ResetPlayerExp

func ResetPlayerExp(p *player.Player)

func SetItemAsUnbreakable

func SetItemAsUnbreakable(stack item.Stack) item.Stack

func UpdatePlayerNameTagWithHealth

func UpdatePlayerNameTagWithHealth(p *player.Player, additionalHealth float64)

func UpdateXPBarCooldownDisplay

func UpdateXPBarCooldownDisplay(p *player.Player, lastCooldownStart time.Time, cooldown time.Duration)

Types

type Location

type Location struct {
	X     float64
	Y     float64
	Z     float64
	Yaw   float32
	Pitch float32
}

func ParseSliceOfLocation

func ParseSliceOfLocation(slice [][5]float64) []Location

func (Location) TeleportPlayer

func (loc Location) TeleportPlayer(p *player.Player)

func (Location) ToMgl32Vec3

func (loc Location) ToMgl32Vec3() mgl32.Vec3

func (Location) ToMgl64Vec3

func (loc Location) ToMgl64Vec3() mgl64.Vec3

type SetHealthSource

type SetHealthSource struct {
}

func (SetHealthSource) HealingSource

func (SetHealthSource) HealingSource()

Jump to

Keyboard shortcuts

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