Başvuru
Bu sayfa İngilizce gösteriliyor.
content
Files and items for the server's own resource pack: textures, models, fonts, sounds, translations and custom items.
Declarations from the script contract strawberry:plugin, version 0.2.0, without source comments.
WIT declarations
use player.{player};
use item-stack.{item-stack};
enum content-error-code {
invalid-id,
invalid-asset,
too-large,
limit-reached,
namespace-denied,
conflict,
unsupported,
permission-denied,
}
record content-error {
code: content-error-code,
path: option<string>,
detail: string,
}
enum pack-family {
java,
bedrock,
}
enum pack-build-state {
off,
building,
publishing,
ready,
failed,
}
record pack-status {
state: pack-build-state,
revision: u64,
sha1: option<string>,
size: u64,
errors: list<content-error>,
}
enum player-pack-state {
none,
pending,
loaded,
declined,
failed,
}
record content-item {
id: string,
plugin: string,
model: string,
}
namespace: func() -> result<string, content-error>;
add-asset: func(path: string, family: pack-family, data: list<u8>) -> result<_, content-error>;
register-glyph: func(id: string, png: list<u8>, height: u8, ascent: s8) -> result<string, content-error>;
register-sound: func(id: string, ogg: list<u8>) -> result<_, content-error>;
add-translations: func(locale: string, entries: list<tuple<string, string>>) -> result<_, content-error>;
register-item: func(id: string, settings: string) -> result<_, content-error>;
set-block-model: func(key: string, model: option<string>) -> result<_, content-error>;
set-block-state-model: func(key: string, state: u16, model: option<string>) -> result<_, content-error>;
create-item: func(id: string, count: u8) -> result<item-stack, content-error>;
item-id: func(item: borrow<item-stack>) -> option<string>;
items: func() -> list<content-item>;
commit: func() -> result<_, content-error>;
pack: func() -> pack-status;
player-pack: func(player: borrow<player>) -> player-pack-state;
record jukebox-song {
key: string,
sound-event: string,
length-in-seconds: f32,
comparator-output: u8,
}
record painting-variant {
key: string,
width: u8,
height: u8,
has-author: bool,
}
record trim-pattern {
key: string,
decal: bool,
}
record trim-material {
key: string,
color: u32,
}
register-jukebox-song: func(song: jukebox-song) -> result<string, content-error>;
register-painting: func(painting: painting-variant) -> result<string, content-error>;
register-trim-pattern: func(pattern: trim-pattern) -> result<string, content-error>;
register-trim-material: func(material: trim-material) -> result<string, content-error>;