scripting

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VM

type VM struct {
	CB struct {
		OnEntityAdd        func(entity any, metadata *goja.Object) (ignore bool)
		OnChunkAdd         func(pos world.ChunkPos) (ignore bool)
		OnEntityDataUpdate func(entity any, metadata *goja.Object)
	}
	// contains filtered or unexported fields
}

func New

func New() *VM

func (*VM) Load

func (v *VM) Load(script string) error

func (*VM) OnEntityAdd

func (v *VM) OnEntityAdd(entity any, metadata protocol.EntityMetadata) bool

func (*VM) OnEntityDataUpdate

func (v *VM) OnEntityDataUpdate(entity any, metadata protocol.EntityMetadata)

Jump to

Keyboard shortcuts

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