resourcepack

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientEntity

type ClientEntity struct {
	Description *ClientEntityDescription `json:"description"`
}

type ClientEntityDescription

type ClientEntityDescription struct {
	Identifier        string            `json:"identifier"`
	Materials         map[string]string `json:"materials"`
	Geometry          map[string]string `json:"geometry"`
	Textures          map[string]string `json:"textures"`
	Scripts           map[string]any    `json:"scripts,omitempty"`
	Animations        map[string]string `json:"animations,omitempty"`
	RenderControllers []any             `json:"render_controllers"`
}

type ClientEntityFile

type ClientEntityFile struct {
	FormatVersion string        `json:"format_version"`
	ClientEntity  *ClientEntity `json:"minecraft:client_entity"`
}

type Geometry

type Geometry struct {
	Description utils.SkinGeometryDescription `json:"description"`
	Bones       []any                         `json:"bones"`
}

type GeometryFile

type GeometryFile struct {
	FormatVersion string      `json:"format_version"`
	Geometry      []*Geometry `json:"minecraft:geometry"`
}

type Pack

type Pack struct {
	Manifest resource.Manifest
	Files    map[string][]byte
}

func New

func New() *Pack

func (*Pack) AddEntity

func (p *Pack) AddEntity(dir, name string, texture *image.RGBA, geometry *GeometryFile, isDefault bool)

func (*Pack) AddPlayer

func (p *Pack) AddPlayer(id string, skinTexture *image.RGBA, capeTexture *image.RGBA, capeID string, geometry *GeometryFile, isDefault bool)

func (*Pack) WriteTo

func (p *Pack) WriteTo(w io.Writer)

func (*Pack) WriteToDir

func (p *Pack) WriteToDir(dir string)

Jump to

Keyboard shortcuts

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