packet

package
v0.0.0-...-33a667e Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const IDCraftingEvent = 53

Variables

This section is empty.

Functions

func NewClientPool

func NewClientPool() packet.Pool

func NewServerPool

func NewServerPool() packet.Pool

Types

type CraftingEvent

type CraftingEvent struct {
	// WindowID is the ID representing the window that the player crafted in.
	WindowID byte
	// CraftingType is a type that indicates the way the crafting was done, for example if a crafting table
	// was used.
	// TODO: Find out the options of the CraftingType field in the CraftingEvent packet.
	CraftingType int32
	// RecipeUUID is the UUID of the recipe that was crafted. It points to the UUID of the recipe that was
	// sent earlier in the CraftingData packet.
	RecipeUUID uuid.UUID
	// Input is a list of items that the player put into the recipe so that it could create the Output items.
	// These items are consumed in the process.
	Input []protocol.ItemInstance
	// Output is a list of items that were obtained as a result of crafting the recipe.
	Output []protocol.ItemInstance
}

CraftingEvent is sent by the client when it crafts a particular item. Note that this packet may be fully ignored, as the InventoryTransaction packet provides all the information required.

func (*CraftingEvent) ID

func (*CraftingEvent) ID() uint32

ID ...

func (*CraftingEvent) Marshal

func (pk *CraftingEvent) Marshal(io protocol.IO)

type ShowStoreOffer

type ShowStoreOffer struct {
	// OfferID is a string that identifies the offer for which a window should be opened. While typically a
	// UUID, the ID could be anything.
	OfferID string
	// ShowAll specifies if all other offers of the same 'author' as the one of the offer associated with the
	// OfferID should also be displayed, alongside the target offer.
	ShowAll bool
}

func (*ShowStoreOffer) ID

func (*ShowStoreOffer) ID() uint32

func (*ShowStoreOffer) Marshal

func (pk *ShowStoreOffer) Marshal(io protocol.IO)

Jump to

Keyboard shortcuts

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