behaviourpack

package
v1.41.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockBehaviour added in v1.41.0

type BlockBehaviour struct {
	FormatVersion  string         `json:"format_version"`
	MinecraftBlock MinecraftBlock `json:"minecraft:block"`
}

type EntityDescription added in v1.28.0

type EntityDescription struct {
	Identifier   string `json:"identifier"`
	Spawnable    bool   `json:"is_spawnable"`
	Summonable   bool   `json:"is_summonable"`
	Experimental bool   `json:"is_experimental"`

	Properties map[string]EntityPropertyJson `json:"properties,omitempty"`
}

type EntityPropertyJson added in v1.39.1

type EntityPropertyJson struct {
	Type       string `json:"type"`
	Values     any    `json:"values,omitempty"`
	Range      []any  `json:"range,omitempty"`
	Default    any    `json:"default,omitempty"`
	ClientSync bool   `json:"client_sync"`
}

type MinecraftBiome added in v1.31.1

type MinecraftBiome struct {
	Description biomeDescription `json:"description"`
}

type MinecraftBlock added in v1.31.1

type MinecraftBlock struct {
	Description  description    `json:"description"`
	Components   map[string]any `json:"components,omitempty"`
	Permutations []permutation  `json:"permutations,omitempty"`
}

type MinecraftEntity added in v1.28.0

type MinecraftEntity struct {
	Description     *EntityDescription `json:"description"`
	ComponentGroups map[string]any     `json:"component_groups,omitempty"`
	Components      map[string]any     `json:"components,omitempty"`
	Events          map[string]any     `json:"events,omitempty"`
}

type Pack added in v1.37.0

type Pack struct {
	Manifest *resource.Manifest
	// contains filtered or unexported fields
}

func New

func New(name string) *Pack

func (*Pack) AddBiomes added in v1.37.0

func (b *Pack) AddBiomes(biomesMap map[string]any)

func (*Pack) AddBlock added in v1.37.0

func (bp *Pack) AddBlock(block protocol.BlockEntry)

func (*Pack) AddDependency added in v1.37.0

func (bp *Pack) AddDependency(id string, ver resource.Version)

func (*Pack) AddEntity added in v1.37.0

func (bp *Pack) AddEntity(EntityType string, attr []protocol.AttributeValue, meta protocol.EntityMetadata, props map[string]*entity.EntityProperty)

func (*Pack) AddItem added in v1.37.0

func (bp *Pack) AddItem(item protocol.ItemEntry)

func (*Pack) ApplyComponentEntries added in v1.37.0

func (bp *Pack) ApplyComponentEntries(entries []protocol.ItemComponentEntry)
func (bp *Pack) CheckAddLink(pack resource.Pack)

func (*Pack) HasBlocks added in v1.37.0

func (bp *Pack) HasBlocks() bool

func (*Pack) HasContent added in v1.37.0

func (bp *Pack) HasContent() bool

func (*Pack) HasEntities added in v1.37.0

func (bp *Pack) HasEntities() bool

func (*Pack) HasItems added in v1.37.0

func (bp *Pack) HasItems() bool

func (*Pack) Save added in v1.37.0

func (bp *Pack) Save(fs utils.WriterFS, fpath string) error

type Trait added in v1.39.1

type Trait map[string]any

Jump to

Keyboard shortcuts

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