keyrevision

package
v0.36.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Applicable

func Applicable(rev Revision, protocol proto.Protocol) bool

Applicable returns whether the revision is applicable to the protocol version.

func RevisionIndex added in v0.22.0

func RevisionIndex(rev Revision) int

RevisionIndex returns the index of the revision in the Revisions slice.

Types

type Revision

type Revision interface {
	ApplicableTo() []proto.Protocol
}
var (
	GenericV1 Revision = &revision{
		name: "GenericV1",
		applicableTo: []proto.Protocol{
			version.Minecraft_1_19.Protocol,
		},
	}
	LinkedV2 Revision = &revision{
		name: "LinkedV2",
		applicableTo: []proto.Protocol{
			version.Minecraft_1_19_1.Protocol,
		},
	}
	Revisions = []Revision{
		GenericV1,
		LinkedV2,
	}
)

Jump to

Keyboard shortcuts

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