Documentation ¶
Index ¶
- type BlockTranslator
- type DefaultBlockTranslator
- func (t *DefaultBlockTranslator) DowngradeBlockPackets(pks []packet.Packet, conn *minecraft.Conn) (result []packet.Packet)
- func (t *DefaultBlockTranslator) DowngradeBlockRuntimeID(input uint32) uint32
- func (t *DefaultBlockTranslator) DowngradeChunk(input *chunk.Chunk) *chunk.Chunk
- func (t *DefaultBlockTranslator) DowngradeSubChunk(input *chunk.SubChunk)
- func (t *DefaultBlockTranslator) UpgradeBlockPackets(pks []packet.Packet, conn *minecraft.Conn) (result []packet.Packet)
- func (t *DefaultBlockTranslator) UpgradeBlockRuntimeID(input uint32) uint32
- type DefaultItemTranslator
- func (t *DefaultItemTranslator) CustomItems() map[int32]world.CustomItem
- func (t *DefaultItemTranslator) DowngradeItemDescriptor(input protocol.ItemDescriptor) protocol.ItemDescriptor
- func (t *DefaultItemTranslator) DowngradeItemDescriptorCount(input protocol.ItemDescriptorCount) protocol.ItemDescriptorCount
- func (t *DefaultItemTranslator) DowngradeItemInstance(input protocol.ItemInstance) protocol.ItemInstance
- func (t *DefaultItemTranslator) DowngradeItemPackets(pks []packet.Packet, _ *minecraft.Conn) (result []packet.Packet)
- func (t *DefaultItemTranslator) DowngradeItemStack(input protocol.ItemStack) protocol.ItemStack
- func (t *DefaultItemTranslator) DowngradeItemType(input protocol.ItemType) protocol.ItemType
- func (t *DefaultItemTranslator) Register(item world.CustomItem, replacement string)
- func (t *DefaultItemTranslator) UpgradeItemDescriptor(input protocol.ItemDescriptor) protocol.ItemDescriptor
- func (t *DefaultItemTranslator) UpgradeItemDescriptorCount(input protocol.ItemDescriptorCount) protocol.ItemDescriptorCount
- func (t *DefaultItemTranslator) UpgradeItemInstance(input protocol.ItemInstance) protocol.ItemInstance
- func (t *DefaultItemTranslator) UpgradeItemPackets(pks []packet.Packet, _ *minecraft.Conn) (result []packet.Packet)
- func (t *DefaultItemTranslator) UpgradeItemStack(input protocol.ItemStack) protocol.ItemStack
- func (t *DefaultItemTranslator) UpgradeItemType(input protocol.ItemType) protocol.ItemType
- type ItemTranslator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockTranslator ¶
type BlockTranslator interface { // DowngradeBlockPackets downgrades the input block packets to legacy block packets. DowngradeBlockPackets([]packet.Packet, *minecraft.Conn) (result []packet.Packet) // UpgradeBlockPackets upgrades the input block packets to the latest block packets. UpgradeBlockPackets([]packet.Packet, *minecraft.Conn) (result []packet.Packet) }
type DefaultBlockTranslator ¶
type DefaultBlockTranslator struct {
// contains filtered or unexported fields
}
func NewBlockTranslator ¶
func NewBlockTranslator(mapping mapping.Block, latestMapping mapping.Block, pse chunk.Encoding, pe chunk.PaletteEncoding, oldFormat bool) *DefaultBlockTranslator
func (*DefaultBlockTranslator) DowngradeBlockPackets ¶
func (*DefaultBlockTranslator) DowngradeBlockRuntimeID ¶
func (t *DefaultBlockTranslator) DowngradeBlockRuntimeID(input uint32) uint32
func (*DefaultBlockTranslator) DowngradeChunk ¶
func (t *DefaultBlockTranslator) DowngradeChunk(input *chunk.Chunk) *chunk.Chunk
func (*DefaultBlockTranslator) DowngradeSubChunk ¶
func (t *DefaultBlockTranslator) DowngradeSubChunk(input *chunk.SubChunk)
func (*DefaultBlockTranslator) UpgradeBlockPackets ¶
func (*DefaultBlockTranslator) UpgradeBlockRuntimeID ¶
func (t *DefaultBlockTranslator) UpgradeBlockRuntimeID(input uint32) uint32
type DefaultItemTranslator ¶
type DefaultItemTranslator struct {
// contains filtered or unexported fields
}
func NewItemTranslator ¶
func (*DefaultItemTranslator) CustomItems ¶
func (t *DefaultItemTranslator) CustomItems() map[int32]world.CustomItem
func (*DefaultItemTranslator) DowngradeItemDescriptor ¶
func (t *DefaultItemTranslator) DowngradeItemDescriptor(input protocol.ItemDescriptor) protocol.ItemDescriptor
func (*DefaultItemTranslator) DowngradeItemDescriptorCount ¶
func (t *DefaultItemTranslator) DowngradeItemDescriptorCount(input protocol.ItemDescriptorCount) protocol.ItemDescriptorCount
func (*DefaultItemTranslator) DowngradeItemInstance ¶
func (t *DefaultItemTranslator) DowngradeItemInstance(input protocol.ItemInstance) protocol.ItemInstance
func (*DefaultItemTranslator) DowngradeItemPackets ¶
func (*DefaultItemTranslator) DowngradeItemStack ¶
func (t *DefaultItemTranslator) DowngradeItemStack(input protocol.ItemStack) protocol.ItemStack
func (*DefaultItemTranslator) DowngradeItemType ¶
func (t *DefaultItemTranslator) DowngradeItemType(input protocol.ItemType) protocol.ItemType
func (*DefaultItemTranslator) Register ¶
func (t *DefaultItemTranslator) Register(item world.CustomItem, replacement string)
func (*DefaultItemTranslator) UpgradeItemDescriptor ¶
func (t *DefaultItemTranslator) UpgradeItemDescriptor(input protocol.ItemDescriptor) protocol.ItemDescriptor
func (*DefaultItemTranslator) UpgradeItemDescriptorCount ¶
func (t *DefaultItemTranslator) UpgradeItemDescriptorCount(input protocol.ItemDescriptorCount) protocol.ItemDescriptorCount
func (*DefaultItemTranslator) UpgradeItemInstance ¶
func (t *DefaultItemTranslator) UpgradeItemInstance(input protocol.ItemInstance) protocol.ItemInstance
func (*DefaultItemTranslator) UpgradeItemPackets ¶
func (*DefaultItemTranslator) UpgradeItemStack ¶
func (t *DefaultItemTranslator) UpgradeItemStack(input protocol.ItemStack) protocol.ItemStack
func (*DefaultItemTranslator) UpgradeItemType ¶
func (t *DefaultItemTranslator) UpgradeItemType(input protocol.ItemType) protocol.ItemType
type ItemTranslator ¶
type ItemTranslator interface { // DowngradeItemType downgrades the input item type to a legacy item type. DowngradeItemType(input protocol.ItemType) protocol.ItemType // DowngradeItemStack downgrades the input item stack to a legacy item stack. DowngradeItemStack(input protocol.ItemStack) protocol.ItemStack // DowngradeItemInstance downgrades the input item instance to a legacy item instance. DowngradeItemInstance(input protocol.ItemInstance) protocol.ItemInstance // DowngradeItemDescriptor downgrades the input item descriptor to a legacy item descriptor. DowngradeItemDescriptor(input protocol.ItemDescriptor) protocol.ItemDescriptor // DowngradeItemDescriptorCount downgrades the input item descriptor (with count) to a legacy item descriptor (with count). DowngradeItemDescriptorCount(input protocol.ItemDescriptorCount) protocol.ItemDescriptorCount DowngradeItemPackets(pks []packet.Packet, conn *minecraft.Conn) []packet.Packet // UpgradeItemType upgrades the input item type to the latest item type. UpgradeItemType(input protocol.ItemType) protocol.ItemType // UpgradeItemStack upgrades the input item stack to the latest item stack. UpgradeItemStack(input protocol.ItemStack) protocol.ItemStack // UpgradeItemInstance upgrades the input item instance to the latest item instance. UpgradeItemInstance(input protocol.ItemInstance) protocol.ItemInstance // UpgradeItemDescriptor upgrades the input item descriptor to the latest item descriptor. UpgradeItemDescriptor(input protocol.ItemDescriptor) protocol.ItemDescriptor // UpgradeItemDescriptorCount upgrades the input item descriptor (with count) to the latest item descriptor (with count). UpgradeItemDescriptorCount(input protocol.ItemDescriptorCount) protocol.ItemDescriptorCount UpgradeItemPackets(pks []packet.Packet, conn *minecraft.Conn) []packet.Packet // Register registers a custom item entry. Register(item world.CustomItem, replacement string) // CustomItems lists all custom items used as substitutes, with the runtime id as the key CustomItems() map[int32]world.CustomItem }
Click to show internal directories.
Click to hide internal directories.