utils

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ARMOR_MAP = map[string]string{"diamond_layer_1": "diamond_1", "diamond_layer_2": "diamond_2", "chainmail_layer_1": "chain_1", "chainmail_layer_2": "chain_2", "gold_layer_1": "gold_1", "gold_layer_2": "gold_2", "iron_layer_1": "iron_1", "iron_layer_2": "iron_2", "leather_layer_1": "cloth_1", "leather_layer_2": "cloth_2"}
View Source
var BEDS_MAP = map[string]color.RGBA{"black": {20, 20, 20, 255}, "blue": {20, 20, 255, 255}, "brown": {120, 75, 40, 255}, "cyan": {20, 165, 165, 255}, "gray": {120, 120, 120, 255}, "green": {100, 200, 20, 255}, "light_blue": {40, 150, 220, 255}, "lime": {120, 255, 25, 255}, "magenta": {190, 60, 180, 255}, "orange": {255, 127, 25, 255}, "pink": {245, 140, 170, 255}, "purple": {130, 45, 180, 255}, "silver": {180, 180, 180, 255}, "white": {240, 240, 240, 255}, "yellow": {255, 190, 25, 255}}
View Source
var DEFAULT_RECOLOR_LIST = []string{"diamond_sword", "diamond_shovel", "diamond_pickaxe", "diamond_leggings", "diamond_horse_armor", "diamond_hoe", "diamond_chestplate", "diamond_helmet", "diamond_boots", "diamond_axe", "diamond", "diamond_block", "apple", "apple_golden", "bed", "icons", "widgets", "cubemap_0", "cubemap_1", "cubemap_2", "cubemap_3", "cubemap_4", "cubemap_5", "sky", "cloud1", "inventory", "gui", "hotdogempty", "hotdogfull", "diamond_1", "diamond_2", "experiencebarfull", "filled_progress_bar", "empty_progress_bar", "diamond_layer_1", "diamond_layer_2", "diamond_1", "diamond_2", "ender_pearl", "bow", "bow_pulling_0", "bow_pulling_1", "bow_pulling_2", "bow_standby", "totem", "generic_54", "pack_icon", "pack", "bed", "beacon", "bed_feet_end", "bed_feet_side", "bed_feet_top", "bed_head_end", "bed_head_side", "bed_head_top"}
View Source
var POTS_MAP = map[string]color.RGBA{"blindness": {64, 64, 64, 255}, "damageBoost": {139, 0, 0, 255}, "fireResistance": {255, 200, 0, 255}, "harm": {139, 0, 0, 255}, "heal": {255, 0, 0, 255}, "invisibility": {204, 204, 204, 255}, "jump": {0, 255, 0, 255}, "luck": {0, 255, 0, 255}, "moveSlowdown": {192, 192, 192, 255}, "moveSpeed": {0, 255, 255, 255}, "nightVision": {0, 0, 255, 255}, "poison": {0, 255, 0, 255}, "regeneration": {255, 175, 175, 255}, "slowFall": {192, 192, 192, 255}, "turtleMaster": {192, 192, 192, 255}, "waterBreathing": {192, 192, 192, 255}, "weakness": {0, 0, 0, 255}, "haste": {255, 255, 0, 255}, "wither": {61, 43, 31, 255}}

Functions

func ChangeUUID

func ChangeUUID(manifest *resource.Manifest)

func FindClosestDimension

func FindClosestDimension(height int, width int, sizes []int) int

func ParseHex

func ParseHex(hex string) (color.RGBA, error)

func Unzip

func Unzip(source []byte) (map[string][]byte, error)

func Zip

func Zip(in map[string][]byte) ([]byte, error)

Types

type MapFS

type MapFS struct {
	// contains filtered or unexported fields
}

func NewMapFS

func NewMapFS(in map[string][]byte) *MapFS

func (*MapFS) Copy

func (m *MapFS) Copy(src string, dest string) error

func (*MapFS) CopyDir

func (m *MapFS) CopyDir(src string, dest string)

func (*MapFS) Delete

func (m *MapFS) Delete(name string)

func (*MapFS) Dir

func (m *MapFS) Dir(dirname string) map[string][]byte

func (*MapFS) DirExists

func (m *MapFS) DirExists(dirname string) bool

func (*MapFS) InterCopy

func (m *MapFS) InterCopy(srcFS *MapFS, src string, dest string) error

func (*MapFS) InterCopyDir

func (m *MapFS) InterCopyDir(srcFS *MapFS, src string, dest string)

func (*MapFS) RawMap

func (m *MapFS) RawMap() map[string][]byte

func (*MapFS) Read

func (m *MapFS) Read(name string) ([]byte, error)

func (*MapFS) Rename

func (m *MapFS) Rename(oldName string, newName string) error

func (*MapFS) Write

func (m *MapFS) Write(data []byte, name string)

type PackMeta

type PackMeta struct {
	Pack struct {
		Format      int    `json:"pack_format"`
		Description string `json:"description"`
	}
}

func PackMcmeta

func PackMcmeta(mcmeta []byte) (PackMeta, error)

type XpBar

type XpBar struct {
	NinesliceSize [4]int `json:"nineslice_size"`
	BaseSize      [2]int `json:"base_size"`
}

Jump to

Keyboard shortcuts

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