texture

package
v0.0.0-...-e57dd20 Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Icon          = Root + "/gui/sprites/icon"
	Container     = Root + "/gui/container"
	ICDAContainer = Root + "/interactivechatdiscordsrvaddon/gui"
)
View Source
const (
	MinecraftPath = "minecraft:"
	Root          = "/assets/minecraft/textures"
	ImageSuffix   = ".png"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset1x21y

type Asset1x21y struct {
	VersionPath string
}

func NewAsset1x21y

func NewAsset1x21y(version string) *Asset1x21y

func (*Asset1x21y) GetPing

func (a *Asset1x21y) GetPing(ping int) (image.Image, error)

func (*Asset1x21y) GetPlayerInventory

func (a *Asset1x21y) GetPlayerInventory() (image.Image, error)

func (*Asset1x21y) GetTexture

func (a *Asset1x21y) GetTexture(minecraftPath string) (image.Image, error)

type AssetsManager

type AssetsManager interface {
	// GetTexture param like minecraft:block/oak_planks
	GetTexture(minecraftPath string) (image.Image, error)
	// GetPlayerInventory with minecraft ICDA(first) and asset(second), 354 x 354
	GetPlayerInventory() (image.Image, error)
	// GetPing ping < 0 is considered disconnect
	GetPing(ping int) (image.Image, error)
}

func GetAssetManager

func GetAssetManager(version string) (AssetsManager, error)

type Texture

type Texture struct {
	Path  string
	Image image.Image
}

func NewTexture

func NewTexture(path string) *Texture

Jump to

Keyboard shortcuts

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