Documentation ¶
Index ¶
- Constants
- Variables
- type BlocksDxyz
- type ChunkData
- type ChunkDataSize
- type EntityMetadata
- type EntityMetadataTable
- type ErrorUnexpectedPacketId
- type ErrorUnknownPacketId
- type IMarshaler
- type IPacket
- type ItemSlot
- type ItemSlotSlice
- type MapData
- type MultiBlockChanges
- type PacketBlockAction
- type PacketBlockBreakAnimation
- type PacketBlockChange
- type PacketChatMessage
- type PacketChunkData
- type PacketCreativeInventoryAction
- type PacketDisconnect
- type PacketEnchantItem
- type PacketEntity
- type PacketEntityAction
- type PacketEntityAnimation
- type PacketEntityAttach
- type PacketEntityDestroy
- type PacketEntityEffect
- type PacketEntityEquipment
- type PacketEntityHeadLook
- type PacketEntityLook
- type PacketEntityLookAndRelMove
- type PacketEntityMetadata
- type PacketEntityRelMove
- type PacketEntityRemoveEffect
- type PacketEntityStatus
- type PacketEntityTeleport
- type PacketEntityVelocity
- type PacketExperienceOrb
- type PacketExplosion
- type PacketHandshake
- type PacketIncrementStatistic
- type PacketItemCollect
- type PacketItemData
- type PacketKeepAlive
- type PacketLogin
- type PacketMapChunkBulk
- type PacketMobSpawn
- type PacketMultiBlockChange
- type PacketNamedEntitySpawn
- type PacketNamedSoundEffect
- type PacketObjectSpawn
- type PacketPaintingSpawn
- type PacketParticle
- type PacketPlayer
- type PacketPlayerBlockPlacement
- type PacketPlayerDigging
- type PacketPlayerExperience
- type PacketPlayerHoldingChange
- type PacketPlayerListItem
- type PacketPlayerLook
- type PacketPlayerPosition
- type PacketPlayerPositionLook
- func (*PacketPlayerPositionLook) IsPacket()
- func (pkt *PacketPlayerPositionLook) Position(fromClient bool) AbsXyz
- func (pkt *PacketPlayerPositionLook) SetPosition(position AbsXyz, fromClient bool)
- func (pkt *PacketPlayerPositionLook) SetStance(stance AbsCoord, fromClient bool)
- func (pkt *PacketPlayerPositionLook) Stance(fromClient bool) AbsCoord
- type PacketPlayerUseBed
- type PacketPluginMessage
- type PacketRespawn
- type PacketSerializer
- func (ps *PacketSerializer) ReadPacket(reader io.Reader, fromClient bool) (packet IPacket, err error)
- func (ps *PacketSerializer) ReadPacketExpect(reader io.Reader, fromClient bool, pktIds ...byte) (packet IPacket, err error)
- func (ps *PacketSerializer) SerializePackets(packets ...IPacket) []byte
- func (ps *PacketSerializer) WritePacket(writer io.Writer, packet IPacket) (err error)
- func (ps *PacketSerializer) WritePacketsBuffer(buf *bytes.Buffer, packets ...IPacket)
- type PacketServerListPing
- type PacketSignUpdate
- type PacketSoundEffect
- type PacketSpawnPosition
- type PacketState
- type PacketThunderbolt
- type PacketTimeUpdate
- type PacketUpdateHealth
- type PacketUpdateTileEntity
- type PacketUseEntity
- type PacketWindowClick
- type PacketWindowClose
- type PacketWindowItems
- type PacketWindowOpen
- type PacketWindowProgressBar
- type PacketWindowSetSlot
- type PacketWindowTransaction
- type ThrowerData
Constants ¶
const (
// Currently only this protocol version is supported.
ProtocolVersion = 60
)
Variables ¶
var ( ErrorPacketNotPtr = errors.New("packet not passed as a pointer") ErrorUnknownPacketType = errors.New("unknown packet type") ErrorPacketNil = errors.New("packet was passed by a nil pointer") ErrorLengthNegative = errors.New("length was negative") ErrorStrTooLong = errors.New("string was too long") ErrorBadPacketData = errors.New("packet data well-formed but contains out of range values") ErrorBadChunkDataSize = errors.New("map chunk data length mismatches with size") ErrorMismatchingValues = errors.New("packet data contains mismatching values") ErrorInternal = errors.New("implementation problem with packetization") )
Possible error values for reading and writing packets.
Functions ¶
This section is empty.
Types ¶
type BlocksDxyz ¶
type BlocksDxyz []byte
BlocksDxyz contains 3 * number of block relative locations. [0:3] contains the first, [3:6] the second, etc.
func (*BlocksDxyz) MinecraftMarshal ¶
func (b *BlocksDxyz) MinecraftMarshal(writer io.Writer, ps *PacketSerializer) (err error)
func (*BlocksDxyz) MinecraftUnmarshal ¶
func (b *BlocksDxyz) MinecraftUnmarshal(reader io.Reader, ps *PacketSerializer) (err error)
type ChunkData ¶
type ChunkData struct { Size ChunkDataSize Blocks []byte BlockData []byte BlockLight []byte SkyLight []byte }
ChunkData implements IMarshaler.
func (*ChunkData) MinecraftMarshal ¶
func (cd *ChunkData) MinecraftMarshal(writer io.Writer, ps *PacketSerializer) (err error)
func (*ChunkData) MinecraftUnmarshal ¶
func (cd *ChunkData) MinecraftUnmarshal(reader io.Reader, ps *PacketSerializer) (err error)
type ChunkDataSize ¶
type ChunkDataSize struct {
X, Y, Z byte
}
ChunkDataSize contains the dimensions of the data represented inside ChunkData.
type EntityMetadata ¶
type EntityMetadataTable ¶
type EntityMetadataTable []EntityMetadata
EntityMetadataTable implements IMarshaler.
func (*EntityMetadataTable) MinecraftMarshal ¶
func (emt *EntityMetadataTable) MinecraftMarshal(writer io.Writer, ps *PacketSerializer) (err error)
func (*EntityMetadataTable) MinecraftUnmarshal ¶
func (emt *EntityMetadataTable) MinecraftUnmarshal(reader io.Reader, ps *PacketSerializer) (err error)
type ErrorUnexpectedPacketId ¶
type ErrorUnexpectedPacketId byte
func (ErrorUnexpectedPacketId) Error ¶
func (err ErrorUnexpectedPacketId) Error() string
type ErrorUnknownPacketId ¶
type ErrorUnknownPacketId byte
func (ErrorUnknownPacketId) Error ¶
func (err ErrorUnknownPacketId) Error() string
type IMarshaler ¶
type IMarshaler interface { MinecraftUnmarshal(reader io.Reader, ps *PacketSerializer) error MinecraftMarshal(writer io.Writer, ps *PacketSerializer) error }
IMinecraftMarshaler is the interface by which packet fields (or potentially even whole packets) can customize their serialization. It will only work for struct and slice-based types currently, as a hacky method of optimizing which packet fields are checked for this property.
type IPacket ¶
type IPacket interface { // IsPacket doesn't do anything, it's present purely for type-checking // packets. IsPacket() }
type ItemSlot ¶
type ItemSlot struct { ItemTypeId ItemTypeId Count ItemCount Data ItemData // Nbt can be nil. Nbt nbt.Compound }
ItemSlot implements IMarshaler.
func (*ItemSlot) MinecraftMarshal ¶
func (is *ItemSlot) MinecraftMarshal(writer io.Writer, ps *PacketSerializer) error
func (*ItemSlot) MinecraftUnmarshal ¶
func (is *ItemSlot) MinecraftUnmarshal(reader io.Reader, ps *PacketSerializer) error
type ItemSlotSlice ¶
type ItemSlotSlice []ItemSlot
ItemSlotSlice implements IMarshaler.
func (*ItemSlotSlice) MinecraftMarshal ¶
func (slots *ItemSlotSlice) MinecraftMarshal(writer io.Writer, ps *PacketSerializer) (err error)
func (*ItemSlotSlice) MinecraftUnmarshal ¶
func (slots *ItemSlotSlice) MinecraftUnmarshal(reader io.Reader, ps *PacketSerializer) (err error)
type MapData ¶
type MapData []byte
MapData implements IMarshaler.
func (*MapData) MinecraftMarshal ¶
func (md *MapData) MinecraftMarshal(writer io.Writer, ps *PacketSerializer) (err error)
func (*MapData) MinecraftUnmarshal ¶
func (md *MapData) MinecraftUnmarshal(reader io.Reader, ps *PacketSerializer) (err error)
type MultiBlockChanges ¶
type MultiBlockChanges struct { // Coords are packed x,y,z block coordinates relative to a chunk origin. Note // that these differ from the value for BlockIndex, which supplies conversion // methods for this purpose. Coords []int16 TypeIds []byte BlockData []byte }
MultiBlockChanges implements IMarshaler.
func (*MultiBlockChanges) MinecraftMarshal ¶
func (mbc *MultiBlockChanges) MinecraftMarshal(writer io.Writer, ps *PacketSerializer) (err error)
func (*MultiBlockChanges) MinecraftUnmarshal ¶
func (mbc *MultiBlockChanges) MinecraftUnmarshal(reader io.Reader, ps *PacketSerializer) (err error)
type PacketBlockAction ¶
type PacketBlockAction struct { // TODO Hopefully other packets referencing block locations (BlockXyz) will // become consistent and use the same type as this for Y. X int32 Y int16 Z int32 Value1, Value2 byte BlockID int16 }
func (*PacketBlockAction) IsPacket ¶
func (*PacketBlockAction) IsPacket()
type PacketBlockBreakAnimation ¶
func (*PacketBlockBreakAnimation) IsPacket ¶
func (*PacketBlockBreakAnimation) IsPacket()
type PacketBlockChange ¶
type PacketBlockChange struct { Block BlockXyz TypeId BlockId BlockData EntityMetadataTable }
func (*PacketBlockChange) IsPacket ¶
func (*PacketBlockChange) IsPacket()
type PacketChatMessage ¶
type PacketChatMessage struct {
Message string
}
func (*PacketChatMessage) IsPacket ¶
func (*PacketChatMessage) IsPacket()
type PacketChunkData ¶
type PacketChunkData struct { Corner BlockXyz GroundUp bool Primary int16 Add int16 CompSize int32 CompData []byte }
func (*PacketChunkData) IsPacket ¶
func (*PacketChunkData) IsPacket()
type PacketCreativeInventoryAction ¶
type PacketCreativeInventoryAction struct { SlotId SlotId Slot ItemSlot }
func (*PacketCreativeInventoryAction) IsPacket ¶
func (*PacketCreativeInventoryAction) IsPacket()
type PacketDisconnect ¶
type PacketDisconnect struct {
Reason string
}
func (*PacketDisconnect) IsPacket ¶
func (*PacketDisconnect) IsPacket()
type PacketEnchantItem ¶
type PacketEnchantItem struct { WindowId WindowId Enchantment int8 }
func (*PacketEnchantItem) IsPacket ¶
func (*PacketEnchantItem) IsPacket()
type PacketEntity ¶
type PacketEntity struct {
EntityId EntityId
}
func (*PacketEntity) IsPacket ¶
func (*PacketEntity) IsPacket()
type PacketEntityAction ¶
type PacketEntityAction struct { EntityId EntityId Action EntityAction }
func (*PacketEntityAction) IsPacket ¶
func (*PacketEntityAction) IsPacket()
type PacketEntityAnimation ¶
type PacketEntityAnimation struct { EntityId EntityId Animation EntityAnimation }
func (*PacketEntityAnimation) IsPacket ¶
func (*PacketEntityAnimation) IsPacket()
type PacketEntityAttach ¶
type PacketEntityAttach struct { EntityId EntityId VehicleId EntityId }
func (*PacketEntityAttach) IsPacket ¶
func (*PacketEntityAttach) IsPacket()
type PacketEntityDestroy ¶
type PacketEntityDestroy struct { EntityCount int16 EntityId EntityId }
func (*PacketEntityDestroy) IsPacket ¶
func (*PacketEntityDestroy) IsPacket()
type PacketEntityEffect ¶
type PacketEntityEffect struct { EntityId EntityId Effect EntityEffect Amplifier int8 Duration int16 }
func (*PacketEntityEffect) IsPacket ¶
func (*PacketEntityEffect) IsPacket()
type PacketEntityEquipment ¶
type PacketEntityEquipment struct { EntityId EntityId Slot SlotId Item ItemSlot }
func (*PacketEntityEquipment) IsPacket ¶
func (*PacketEntityEquipment) IsPacket()
type PacketEntityHeadLook ¶
type PacketEntityHeadLook struct { EntityId EntityId HeadYaw AngleBytes }
func (*PacketEntityHeadLook) IsPacket ¶
func (*PacketEntityHeadLook) IsPacket()
type PacketEntityLook ¶
type PacketEntityLook struct { EntityId EntityId Look LookBytes }
func (*PacketEntityLook) IsPacket ¶
func (*PacketEntityLook) IsPacket()
type PacketEntityLookAndRelMove ¶
type PacketEntityLookAndRelMove struct { EntityId EntityId Move RelMove Look LookBytes }
func (*PacketEntityLookAndRelMove) IsPacket ¶
func (*PacketEntityLookAndRelMove) IsPacket()
type PacketEntityMetadata ¶
type PacketEntityMetadata struct { EntityId EntityId Metadata EntityMetadataTable }
func (*PacketEntityMetadata) IsPacket ¶
func (*PacketEntityMetadata) IsPacket()
type PacketEntityRelMove ¶
type PacketEntityRelMove struct { EntityId EntityId Move RelMove }
func (*PacketEntityRelMove) IsPacket ¶
func (*PacketEntityRelMove) IsPacket()
type PacketEntityRemoveEffect ¶
type PacketEntityRemoveEffect struct { EntityId EntityId Effect EntityEffect }
func (*PacketEntityRemoveEffect) IsPacket ¶
func (*PacketEntityRemoveEffect) IsPacket()
type PacketEntityStatus ¶
type PacketEntityStatus struct { EntityId EntityId Status EntityStatus }
func (*PacketEntityStatus) IsPacket ¶
func (*PacketEntityStatus) IsPacket()
type PacketEntityTeleport ¶
type PacketEntityTeleport struct { EntityId EntityId Position AbsIntXyz Look LookBytes }
func (*PacketEntityTeleport) IsPacket ¶
func (*PacketEntityTeleport) IsPacket()
type PacketEntityVelocity ¶
type PacketEntityVelocity struct { EntityId EntityId Velocity Velocity }
func (*PacketEntityVelocity) IsPacket ¶
func (*PacketEntityVelocity) IsPacket()
type PacketExperienceOrb ¶
type PacketExperienceOrb struct { EntityId EntityId Position AbsIntXyz Count int16 }
func (*PacketExperienceOrb) IsPacket ¶
func (*PacketExperienceOrb) IsPacket()
type PacketExplosion ¶
type PacketExplosion struct { Center AbsXyz Radius float32 Blocks BlocksDxyz PlayerMotion FloatComb }
func (*PacketExplosion) IsPacket ¶
func (*PacketExplosion) IsPacket()
type PacketHandshake ¶
type PacketHandshake struct { ProtocolVersion byte Username string ServerHost string ServerPort int32 }
func (*PacketHandshake) IsPacket ¶
func (*PacketHandshake) IsPacket()
type PacketIncrementStatistic ¶
type PacketIncrementStatistic struct { StatisticId StatisticId Amount byte }
func (*PacketIncrementStatistic) IsPacket ¶
func (*PacketIncrementStatistic) IsPacket()
type PacketItemCollect ¶
type PacketItemCollect struct { CollectedItem EntityId Collector EntityId }
func (*PacketItemCollect) IsPacket ¶
func (*PacketItemCollect) IsPacket()
type PacketItemData ¶
func (*PacketItemData) IsPacket ¶
func (*PacketItemData) IsPacket()
type PacketKeepAlive ¶
type PacketKeepAlive struct {
Id int32
}
func (*PacketKeepAlive) IsPacket ¶
func (*PacketKeepAlive) IsPacket()
type PacketLogin ¶
type PacketLogin struct { EntityId int32 LevelType string GameMode int32 Dimension DimensionId Difficulty GameDifficulty Unused byte MaxPlayers int32 }
func (*PacketLogin) IsPacket ¶
func (*PacketLogin) IsPacket()
type PacketMapChunkBulk ¶
type PacketMapChunkBulk struct { Count int16 Length int32 SkyLight bool Data []byte Meta ChunkData //@CHECK }
func (*PacketMapChunkBulk) IsPacket ¶
func (*PacketMapChunkBulk) IsPacket()
type PacketMobSpawn ¶
type PacketMobSpawn struct { EntityId EntityId MobType EntityMobType Position AbsIntXyz Look MobLookBytes Velocity Velocity Metadata EntityMetadataTable }
func (*PacketMobSpawn) IsPacket ¶
func (*PacketMobSpawn) IsPacket()
type PacketMultiBlockChange ¶
func (*PacketMultiBlockChange) IsPacket ¶
func (*PacketMultiBlockChange) IsPacket()
type PacketNamedEntitySpawn ¶
type PacketNamedEntitySpawn struct { EntityId EntityId Username string Position AbsIntXyz Rotation LookBytes CurrentItem ItemTypeId MetaData EntityMetadataTable }
func (*PacketNamedEntitySpawn) IsPacket ¶
func (*PacketNamedEntitySpawn) IsPacket()
type PacketNamedSoundEffect ¶
func (*PacketNamedSoundEffect) IsPacket ¶
func (*PacketNamedSoundEffect) IsPacket()
type PacketObjectSpawn ¶
type PacketObjectSpawn struct { EntityId EntityId ObjType ObjTypeId Position AbsIntXyz Rotation LookBytes ObjData ThrowerData }
func (*PacketObjectSpawn) IsPacket ¶
func (*PacketObjectSpawn) IsPacket()
type PacketPaintingSpawn ¶
type PacketPaintingSpawn struct { EntityId EntityId Title string Position AbsIntXyz SideFace SideFace }
func (*PacketPaintingSpawn) IsPacket ¶
func (*PacketPaintingSpawn) IsPacket()
type PacketParticle ¶
type PacketPlayer ¶
type PacketPlayer struct {
OnGround bool
}
func (*PacketPlayer) IsPacket ¶
func (*PacketPlayer) IsPacket()
type PacketPlayerBlockPlacement ¶
type PacketPlayerBlockPlacement struct { Block BlockXyz Face Face Tool ItemSlot Cursor BlockPos }
func (*PacketPlayerBlockPlacement) IsPacket ¶
func (*PacketPlayerBlockPlacement) IsPacket()
type PacketPlayerDigging ¶
type PacketPlayerDigging struct { Status DigStatus Block BlockXyz Face Face }
func (*PacketPlayerDigging) IsPacket ¶
func (*PacketPlayerDigging) IsPacket()
type PacketPlayerExperience ¶
func (*PacketPlayerExperience) IsPacket ¶
func (*PacketPlayerExperience) IsPacket()
type PacketPlayerHoldingChange ¶
type PacketPlayerHoldingChange struct {
SlotId SlotId
}
func (*PacketPlayerHoldingChange) IsPacket ¶
func (*PacketPlayerHoldingChange) IsPacket()
type PacketPlayerListItem ¶
func (*PacketPlayerListItem) IsPacket ¶
func (*PacketPlayerListItem) IsPacket()
type PacketPlayerLook ¶
type PacketPlayerLook struct { Look LookDegrees OnGround bool }
func (*PacketPlayerLook) IsPacket ¶
func (*PacketPlayerLook) IsPacket()
type PacketPlayerPosition ¶
type PacketPlayerPosition struct {
X, Y, Stance, Z AbsCoord
OnGround bool
}
func (*PacketPlayerPosition) IsPacket ¶
func (*PacketPlayerPosition) IsPacket()
func (*PacketPlayerPosition) Position ¶
func (pkt *PacketPlayerPosition) Position() AbsXyz
type PacketPlayerPositionLook ¶
type PacketPlayerPositionLook struct {
X, Y1, Y2, Z AbsCoord
Look LookDegrees
OnGround bool
}
func (*PacketPlayerPositionLook) IsPacket ¶
func (*PacketPlayerPositionLook) IsPacket()
func (*PacketPlayerPositionLook) Position ¶
func (pkt *PacketPlayerPositionLook) Position(fromClient bool) AbsXyz
func (*PacketPlayerPositionLook) SetPosition ¶
func (pkt *PacketPlayerPositionLook) SetPosition(position AbsXyz, fromClient bool)
func (*PacketPlayerPositionLook) SetStance ¶
func (pkt *PacketPlayerPositionLook) SetStance(stance AbsCoord, fromClient bool)
func (*PacketPlayerPositionLook) Stance ¶
func (pkt *PacketPlayerPositionLook) Stance(fromClient bool) AbsCoord
type PacketPlayerUseBed ¶
type PacketPlayerUseBed struct { EntityId EntityId Flag byte Block BlockXyz }
func (*PacketPlayerUseBed) IsPacket ¶
func (*PacketPlayerUseBed) IsPacket()
type PacketPluginMessage ¶
func (*PacketPluginMessage) IsPacket ¶
func (*PacketPluginMessage) IsPacket()
func (*PacketPluginMessage) MinecraftMarshal ¶
func (pkt *PacketPluginMessage) MinecraftMarshal(writer io.Writer, ps *PacketSerializer) (err error)
func (*PacketPluginMessage) MinecraftUnmarshal ¶
func (pkt *PacketPluginMessage) MinecraftUnmarshal(reader io.Reader, ps *PacketSerializer) (err error)
type PacketRespawn ¶
type PacketRespawn struct { Dimension DimensionId Difficulty GameDifficulty GameType GameType WorldHeight int16 LevelType string }
func (*PacketRespawn) IsPacket ¶
func (*PacketRespawn) IsPacket()
type PacketSerializer ¶
type PacketSerializer struct {
// contains filtered or unexported fields
}
PacketSerializer reads and writes packets. It is not safe to use one simultaneously between multiple goroutines.
It does not take responsibility for reading/writing the packet ID byte header.
It is designed to read and write struct types, and can only handle a few types - it is not a generalized serialization mechanism and isn't intended to be one. It exercises the freedom of having only limited types of packet structure partly for simplicity, and partly to allow for optimizations.
func (*PacketSerializer) ReadPacket ¶
func (*PacketSerializer) ReadPacketExpect ¶
func (*PacketSerializer) SerializePackets ¶
func (ps *PacketSerializer) SerializePackets(packets ...IPacket) []byte
func (*PacketSerializer) WritePacket ¶
func (ps *PacketSerializer) WritePacket(writer io.Writer, packet IPacket) (err error)
func (*PacketSerializer) WritePacketsBuffer ¶
func (ps *PacketSerializer) WritePacketsBuffer(buf *bytes.Buffer, packets ...IPacket)
type PacketServerListPing ¶
type PacketServerListPing struct{}
func (*PacketServerListPing) IsPacket ¶
func (*PacketServerListPing) IsPacket()
type PacketSignUpdate ¶
type PacketSignUpdate struct { X int32 Y int16 Z int32 Text1 string Text2 string Text3 string Text4 string }
func (*PacketSignUpdate) IsPacket ¶
func (*PacketSignUpdate) IsPacket()
type PacketSoundEffect ¶
func (*PacketSoundEffect) IsPacket ¶
func (*PacketSoundEffect) IsPacket()
type PacketSpawnPosition ¶
type PacketSpawnPosition struct { X BlockCoord Y BlockYCoord Z BlockCoord }
func (*PacketSpawnPosition) IsPacket ¶
func (*PacketSpawnPosition) IsPacket()
type PacketState ¶
type PacketState struct { Reason byte GameType GameType }
func (*PacketState) IsPacket ¶
func (*PacketState) IsPacket()
type PacketThunderbolt ¶
type PacketThunderbolt struct { EntityId EntityId Flag bool Position AbsIntXyz }
func (*PacketThunderbolt) IsPacket ¶
func (*PacketThunderbolt) IsPacket()
type PacketTimeUpdate ¶
type PacketTimeUpdate struct { Age Ticks Time Ticks }
func (*PacketTimeUpdate) IsPacket ¶
func (*PacketTimeUpdate) IsPacket()
type PacketUpdateHealth ¶
type PacketUpdateHealth struct { Health Health Food FoodUnits FoodSaturation float32 }
func (*PacketUpdateHealth) IsPacket ¶
func (*PacketUpdateHealth) IsPacket()
type PacketUpdateTileEntity ¶
type PacketUseEntity ¶
type PacketUseEntity struct { User EntityId Target EntityId LeftClick bool }
func (*PacketUseEntity) IsPacket ¶
func (*PacketUseEntity) IsPacket()
type PacketWindowClick ¶
type PacketWindowClick struct { WindowId WindowId Slot SlotId RightClick byte TxId TxId Mode byte ClickedItem ItemSlot }
func (*PacketWindowClick) IsPacket ¶
func (*PacketWindowClick) IsPacket()
type PacketWindowClose ¶
type PacketWindowClose struct {
WindowId WindowId
}
func (*PacketWindowClose) IsPacket ¶
func (*PacketWindowClose) IsPacket()
type PacketWindowItems ¶
func (*PacketWindowItems) IsPacket ¶
func (*PacketWindowItems) IsPacket()
type PacketWindowOpen ¶
func (*PacketWindowOpen) IsPacket ¶
func (*PacketWindowOpen) IsPacket()
type PacketWindowProgressBar ¶
type PacketWindowProgressBar struct { WindowId WindowId PrgBarId PrgBarId Value PrgBarValue }
func (*PacketWindowProgressBar) IsPacket ¶
func (*PacketWindowProgressBar) IsPacket()
type PacketWindowSetSlot ¶
type PacketWindowSetSlot struct { WindowId WindowId SlotIndex SlotId Item ItemSlot }
func (*PacketWindowSetSlot) IsPacket ¶
func (*PacketWindowSetSlot) IsPacket()
type PacketWindowTransaction ¶
type PacketWindowTransaction struct { WindowId WindowId TxId TxId Accepted bool }
func (*PacketWindowTransaction) IsPacket ¶
func (*PacketWindowTransaction) IsPacket()
type ThrowerData ¶
type ThrowerData struct { ThrowerId EntityId X, Y, Z int16 }
func (*ThrowerData) MinecraftMarshal ¶
func (fd *ThrowerData) MinecraftMarshal(writer io.Writer, ps *PacketSerializer) error
func (*ThrowerData) MinecraftUnmarshal ¶
func (fd *ThrowerData) MinecraftUnmarshal(reader io.Reader, ps *PacketSerializer) error