play

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type COMMAND

type COMMAND int32
const (
	PERFORM_RESPAWN COMMAND = iota
	REQUEST_STATS
	OPEN_INVENTORY_ACHIEVEMENT
)

type ChatMode added in v0.0.8

type ChatMode byte
const (
	FULL ChatMode = iota
	SYSTEM
	HIDDEN
)

type ENTITY_ACTION

type ENTITY_ACTION int32
const (
	INTERACT ENTITY_ACTION = iota
	ATTACK
	INTERACT_AT
)

type PLAYER_ACTION

type PLAYER_ACTION int32
const (
	START_SNEAKING PLAYER_ACTION = iota
	STOP_SNEAKING
	STOP_SLEEPING
	START_SPRINTING
	STOP_SPRINTING
	RIDING_JUMP
	OPEN_INVENTORY
)

type PacketPlayInAbilities

type PacketPlayInAbilities struct {
	Abilities   player.PlayerAbilities
	FlightSpeed float32
	GroundSpeed float32
}

func (*PacketPlayInAbilities) Pull

func (p *PacketPlayInAbilities) Pull(reader network.Buffer)

func (*PacketPlayInAbilities) UUID

func (p *PacketPlayInAbilities) UUID() int32

type PacketPlayInArmAnimation

type PacketPlayInArmAnimation struct {
	TimeStamp int64
}

func (*PacketPlayInArmAnimation) Pull

func (p *PacketPlayInArmAnimation) Pull(reader network.Buffer)

func (*PacketPlayInArmAnimation) UUID

func (p *PacketPlayInArmAnimation) UUID() int32

type PacketPlayInBlockDig

type PacketPlayInBlockDig struct {
	Action    block.BlockAction
	Position  data.PositionI
	Direction block.BlockDirection
}

func (*PacketPlayInBlockDig) Pull

func (p *PacketPlayInBlockDig) Pull(reader network.Buffer)

func (*PacketPlayInBlockDig) UUID

func (p *PacketPlayInBlockDig) UUID() int32

type PacketPlayInChatMessage

type PacketPlayInChatMessage struct {
	Message string
}

func (*PacketPlayInChatMessage) Pull

func (p *PacketPlayInChatMessage) Pull(reader network.Buffer)

func (*PacketPlayInChatMessage) UUID

func (p *PacketPlayInChatMessage) UUID() int32

type PacketPlayInClientCommand

type PacketPlayInClientCommand struct {
	Action COMMAND
}

func (*PacketPlayInClientCommand) Pull

func (p *PacketPlayInClientCommand) Pull(reader network.Buffer)

func (*PacketPlayInClientCommand) UUID

func (p *PacketPlayInClientCommand) UUID() int32

type PacketPlayInCloseWindow

type PacketPlayInCloseWindow struct {
	Id byte
}

Called on window close

func (*PacketPlayInCloseWindow) Pull

func (p *PacketPlayInCloseWindow) Pull(reader network.Buffer)

func (*PacketPlayInCloseWindow) UUID

func (p *PacketPlayInCloseWindow) UUID() int32

type PacketPlayInCustomPayload

type PacketPlayInCustomPayload struct {
	Prefix string
	Buffer []int8
}

func (*PacketPlayInCustomPayload) Pull

func (p *PacketPlayInCustomPayload) Pull(reader network.Buffer)

func (*PacketPlayInCustomPayload) UUID

func (p *PacketPlayInCustomPayload) UUID() int32

type PacketPlayInEnchantItem

type PacketPlayInEnchantItem struct {
	Id          byte
	Enchantment byte
}

Called on enchant item

func (*PacketPlayInEnchantItem) Pull

func (p *PacketPlayInEnchantItem) Pull(reader network.Buffer)

func (*PacketPlayInEnchantItem) UUID

func (p *PacketPlayInEnchantItem) UUID() int32

type PacketPlayInEntityAction

type PacketPlayInEntityAction struct {
	EntityID int32
	Action   PLAYER_ACTION
	C        int32
}

func (*PacketPlayInEntityAction) Pull

func (p *PacketPlayInEntityAction) Pull(reader network.Buffer)

func (*PacketPlayInEntityAction) UUID

func (p *PacketPlayInEntityAction) UUID() int32

type PacketPlayInFlying

type PacketPlayInFlying struct {
	OnGround bool
}

Send if player is flying

func (*PacketPlayInFlying) Pull

func (p *PacketPlayInFlying) Pull(reader network.Buffer)

func (*PacketPlayInFlying) UUID

func (p *PacketPlayInFlying) UUID() int32

type PacketPlayInHeldItemSlot

type PacketPlayInHeldItemSlot struct {
	HandIndex int16
}

On change item hand slot

func (*PacketPlayInHeldItemSlot) Pull

func (p *PacketPlayInHeldItemSlot) Pull(reader network.Buffer)

func (*PacketPlayInHeldItemSlot) UUID

func (p *PacketPlayInHeldItemSlot) UUID() int32

type PacketPlayInKeepAlive

type PacketPlayInKeepAlive struct {
	KeepAliveID int32
}

func (*PacketPlayInKeepAlive) Pull

func (p *PacketPlayInKeepAlive) Pull(reader network.Buffer)

func (*PacketPlayInKeepAlive) UUID

func (p *PacketPlayInKeepAlive) UUID() int32

type PacketPlayInLook

type PacketPlayInLook struct {
	Yaw      float32
	Pitch    float32
	OnGround bool
}

Send only if the player move the camera

func (*PacketPlayInLook) Pull

func (p *PacketPlayInLook) Pull(reader network.Buffer)

func (*PacketPlayInLook) UUID

func (p *PacketPlayInLook) UUID() int32

type PacketPlayInPosition

type PacketPlayInPosition struct {
	X        float64
	Y        float64
	Z        float64
	OnGround bool
}

Send only if the player move around x,y or z cords

func (*PacketPlayInPosition) Pull

func (p *PacketPlayInPosition) Pull(reader network.Buffer)

func (*PacketPlayInPosition) UUID

func (p *PacketPlayInPosition) UUID() int32

type PacketPlayInPositionLook

type PacketPlayInPositionLook struct {
	X        float64
	Y        float64
	Z        float64
	Yaw      float32
	Pitch    float32
	OnGround bool
}

Send if the player move around x,y or z cords and change the camera

func (*PacketPlayInPositionLook) Pull

func (p *PacketPlayInPositionLook) Pull(reader network.Buffer)

func (*PacketPlayInPositionLook) UUID

func (p *PacketPlayInPositionLook) UUID() int32

type PacketPlayInSetCreativeSlot

type PacketPlayInSetCreativeSlot struct {
	Slot int16
}

Called on interact with slot on gamemode creative

func (*PacketPlayInSetCreativeSlot) Pull

func (p *PacketPlayInSetCreativeSlot) Pull(reader network.Buffer)

func (*PacketPlayInSetCreativeSlot) UUID

type PacketPlayInSettings

type PacketPlayInSettings struct {
	Language     string
	ViewDistance byte
	ChatMode     ChatMode
	ChatColors   bool
	SkinBitMask  uint8
}

func (*PacketPlayInSettings) Pull

func (p *PacketPlayInSettings) Pull(reader network.Buffer)

func (*PacketPlayInSettings) UUID

func (p *PacketPlayInSettings) UUID() int32

type PacketPlayInSpectate

type PacketPlayInSpectate struct {
	Uuid data.UUID
}

func (*PacketPlayInSpectate) Pull

func (p *PacketPlayInSpectate) Pull(reader network.Buffer)

func (*PacketPlayInSpectate) UUID

func (p *PacketPlayInSpectate) UUID() int32

type PacketPlayInTabComplete

type PacketPlayInTabComplete struct {
	Message string
}

On tabcomplete a command in chat or command block

func (*PacketPlayInTabComplete) Pull

func (p *PacketPlayInTabComplete) Pull(reader network.Buffer)

func (*PacketPlayInTabComplete) UUID

func (p *PacketPlayInTabComplete) UUID() int32

type PacketPlayInTransaction

type PacketPlayInTransaction struct {
	Id       byte
	Slot     int16
	Accepted bool
}

Called on trade

func (*PacketPlayInTransaction) Pull

func (p *PacketPlayInTransaction) Pull(reader network.Buffer)

func (*PacketPlayInTransaction) UUID

func (p *PacketPlayInTransaction) UUID() int32

type PacketPlayInUseEntity

type PacketPlayInUseEntity struct {
	EntityID int32
	Action   ENTITY_ACTION

	VectorX float32
	VectorY float32
	VectorZ float32
}

func (*PacketPlayInUseEntity) Pull

func (p *PacketPlayInUseEntity) Pull(reader network.Buffer)

func (*PacketPlayInUseEntity) UUID

func (p *PacketPlayInUseEntity) UUID() int32

type PacketPlayInWindowClick

type PacketPlayInWindowClick struct {
	Id     byte
	Slot   int16
	Button byte
	Unique int16
	Shift  byte
}

Called on window close

func (*PacketPlayInWindowClick) Pull

func (p *PacketPlayInWindowClick) Pull(reader network.Buffer)

func (*PacketPlayInWindowClick) UUID

func (p *PacketPlayInWindowClick) UUID() int32

Jump to

Keyboard shortcuts

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