forge

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Clients attempting to connect to 1.8-1.12.2 Forge servers will have
	// this token appended to the hostname in the initial handshake packet.
	HandshakeHostnameToken = "\000FML\000"
	// The channel for legacy forge handshakes.
	LegacyHandshakeChannel = "FML|HS"
	// The reset packet discriminator.
	ResetDataDiscriminator = -2
	// The acknowledgement packet discriminator.
	AckDiscriminator = -1
	// The Server -> Client Hello discriminator.
	ServerHelloDiscriminator = 0
	// The Client -> Server Hello discriminator.
	ClientHelloDiscriminator = 1
	// The Mod List discriminator.
	ModListDiscriminator = 2
	// The Registry discriminator.
	RegistryDiscriminator = 3
)

Variables

View Source
var LegacyHandshakeResetData = []byte{ResetDataDiscriminator & 0xff, 0}

LegacyHandshakeResetData is the payload for the reset packet.

Functions

func HandshakePacketDiscriminator

func HandshakePacketDiscriminator(message *plugin.Message) (byte, bool)

HandshakePacketDiscriminator returns the discriminator from the FML|HS packet (the first byte in the data).

func ReadMods

func ReadMods(message *plugin.Message) ([]modinfo.Mod, error)

ReadMods returns the mod list from the mod list packet and parses it. May be empty.

func ResetPacket

func ResetPacket() *plugin.Message

ResetPacket returns a new forge reset packet.

Types

This section is empty.

Jump to

Keyboard shortcuts

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