Documentation
¶
Index ¶
- Variables
- type VM
- func (v *VM) Load(script string) error
- func (v *VM) OnBlockUpdate(name string, properties map[string]any, pos protocol.BlockPos, ...) (apply bool)
- func (v *VM) OnChunkAdd(pos world.ChunkPos, timeReceived time.Time) (apply bool)
- func (v *VM) OnEntityAdd(entity *entity.Entity, timeReceived time.Time) (apply bool)
- func (v *VM) OnEntityDataUpdate(entity *entity.Entity, timeReceived time.Time)
- func (v *VM) OnPacket(pk packet.Packet, toServer bool, timeReceived time.Time) (drop bool)
- func (v *VM) OnSpawnParticle(name string, position mgl32.Vec3, timeReceived time.Time)
Constants ¶
This section is empty.
Variables ¶
View Source
var EntityFlags = []string{}/* 118 elements not displayed */
View Source
var EntityKeys = []string{}/* 132 elements not displayed */
Functions ¶
This section is empty.
Types ¶
type VM ¶
type VM struct { CB struct { OnEntityAdd func(entity *entity.Entity, metadata *goja.Object, timeReceived float64) (apply goja.Value) OnChunkAdd func(pos world.ChunkPos, timeReceived float64) (apply goja.Value) OnEntityDataUpdate func(entity *entity.Entity, metadata *goja.Object, timeReceived float64) OnBlockUpdate func(name string, properties map[string]any, pos protocol.BlockPos, timeReceived float64) (apply goja.Value) OnSpawnParticle func(name string, pos mgl32.Vec3, timeReceived float64) OnPacket func(name string, pk packet.Packet, toServer bool, timeReceived float64) (drop bool) } // contains filtered or unexported fields }
func (*VM) OnBlockUpdate ¶ added in v1.39.1
func (*VM) OnChunkAdd ¶ added in v1.39.0
func (*VM) OnEntityAdd ¶
func (*VM) OnEntityDataUpdate ¶
Click to show internal directories.
Click to hide internal directories.