minetest_client/commands/server_delete_particlespawner.go
2021-10-01 19:07:07 +02:00

28 lines
593 B
Go

package commands
import (
"encoding/binary"
"fmt"
)
type ServerDeleteParticleSpawner struct {
ServerID uint32
}
func (p *ServerDeleteParticleSpawner) GetCommandId() uint16 {
return ServerCommandDeleteParticleSpawner
}
func (p *ServerDeleteParticleSpawner) MarshalPacket() ([]byte, error) {
return nil, nil
}
func (p *ServerDeleteParticleSpawner) UnmarshalPacket(payload []byte) error {
p.ServerID = binary.BigEndian.Uint32(payload)
return nil
}
func (p *ServerDeleteParticleSpawner) String() string {
return fmt.Sprintf("{ServerDeleteParticleSpawner ServerID=%d}", p.ServerID)
}