util

package
v0.0.0-...-e5bf19b Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LatestAirRID, _ = latest.StateToRuntimeID("minecraft:air", nil)

LatestAirRID is the runtime ID of the air block in the latest version of the game.

Functions

func DefaultDowngrade

func DefaultDowngrade(conn *minecraft.Conn, pk packet.Packet, mapping mappings.MVMapping) (packet.Packet, bool)

DefaultDowngrade translates a packet from the latest version to the legacy version.

func DefaultUpgrade

func DefaultUpgrade(conn *minecraft.Conn, pk packet.Packet, mapping mappings.MVMapping) (packet.Packet, bool)

DefaultUpgrade translates a packet from the legacy version to the latest version.

func DowngradeBlockRuntimeID

func DowngradeBlockRuntimeID(input uint32, mappings mappings.MVMapping) uint32

DowngradeBlockRuntimeID downgrades a latest block runtime ID to a legacy block runtime ID.

func DowngradeItem

func DowngradeItem(input protocol.ItemStack, mappings mappings.MVMapping) protocol.ItemStack

DowngradeItem downgrades the input item stack to a legacy item stack. It returns a boolean indicating if the item was downgraded successfully.

func UpgradeBlockRuntimeID

func UpgradeBlockRuntimeID(input uint32, mappings mappings.MVMapping) uint32

UpgradeBlockRuntimeID upgrades a legacy block runtime ID to a latest block runtime ID.

func UpgradeItem

func UpgradeItem(input protocol.ItemStack, mappings mappings.MVMapping) protocol.ItemStack

UpgradeItem upgrades the input item stack to a latest item stack. It returns a boolean indicating if the item was upgraded successfully.

Types

This section is empty.

Jump to

Keyboard shortcuts

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