424 lines
14 KiB
Plaintext
424 lines
14 KiB
Plaintext
interface block-entity {
|
|
use common.{block-pos, nbt-tree};
|
|
use item-stack.{item-stack};
|
|
use inventory.{inventory};
|
|
|
|
resource block-entity {
|
|
resource-location: func() -> string;
|
|
get-position: func() -> block-pos;
|
|
get-id: func() -> u32;
|
|
is-dirty: func() -> bool;
|
|
clear-dirty: func();
|
|
|
|
/// Sets a namespaced custom data value on this block entity.
|
|
set-custom-data: func(namespace: string, key: string, value: nbt-tree);
|
|
/// Returns a namespaced custom data value from this block entity, if set.
|
|
get-custom-data: func(namespace: string, key: string) -> option<nbt-tree>;
|
|
/// Removes a namespaced custom data value from this block entity.
|
|
remove-custom-data: func(namespace: string, key: string);
|
|
/// Returns whether this block entity has a namespaced custom data value.
|
|
has-custom-data: func(namespace: string, key: string) -> bool;
|
|
}
|
|
|
|
resource container-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
/// Returns the generic inventory handle for this container.
|
|
get-inventory: func() -> inventory;
|
|
get-size: func() -> u32;
|
|
is-empty: func() -> bool;
|
|
get-stack: func(slot: u32) -> option<item-stack>;
|
|
set-stack: func(slot: u32, stack: option<item-stack>);
|
|
remove-stack: func(slot: u32) -> option<item-stack>;
|
|
clear: func();
|
|
}
|
|
|
|
resource command-block-entity {
|
|
get-block-entity: func () -> block-entity;
|
|
last-output: func() -> string;
|
|
track-output: func() -> bool;
|
|
success-count: func() -> u32;
|
|
command: func() -> string;
|
|
auto: func() -> bool;
|
|
condition-met: func() -> bool;
|
|
powered: func() -> bool;
|
|
}
|
|
|
|
enum dye-color {
|
|
white,
|
|
orange,
|
|
magenta,
|
|
light-blue,
|
|
yellow,
|
|
lime,
|
|
pink,
|
|
gray,
|
|
light-gray,
|
|
cyan,
|
|
purple,
|
|
blue,
|
|
brown,
|
|
green,
|
|
red,
|
|
black,
|
|
}
|
|
|
|
record sign-text {
|
|
messages: list<string>,
|
|
color: dye-color,
|
|
has-glowing-text: bool,
|
|
}
|
|
|
|
resource sign-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-front-text: func() -> sign-text;
|
|
set-front-text: func(text: sign-text);
|
|
get-back-text: func() -> sign-text;
|
|
set-back-text: func(text: sign-text);
|
|
is-waxed: func() -> bool;
|
|
set-waxed: func(waxed: bool);
|
|
}
|
|
|
|
resource jukebox-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
is-playing: func() -> bool;
|
|
stop-playing: func();
|
|
start-playing: func(length-in-ticks: u64);
|
|
}
|
|
|
|
resource chest-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
viewer-count: func() -> u32;
|
|
}
|
|
|
|
resource mob-spawner-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-spawn-count: func() -> s32;
|
|
get-spawn-range: func() -> s32;
|
|
get-delay: func() -> s32;
|
|
}
|
|
|
|
resource map-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-map-id: func() -> s32;
|
|
set-map-id: func(map-id: s32);
|
|
get-colors: func() -> list<u8>;
|
|
set-colors: func(colors: list<u8>);
|
|
set-pixel: func(x: u32, y: u32, color: u8);
|
|
get-pixel: func(x: u32, y: u32) -> u8;
|
|
update: func();
|
|
stream-frame: func(frame-data: list<u8>);
|
|
}
|
|
|
|
resource hanging-sign-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-front-text: func() -> sign-text;
|
|
set-front-text: func(text: sign-text);
|
|
get-back-text: func() -> sign-text;
|
|
set-back-text: func(text: sign-text);
|
|
is-waxed: func() -> bool;
|
|
set-waxed: func(waxed: bool);
|
|
}
|
|
|
|
resource trapped-chest-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
viewer-count: func() -> u32;
|
|
}
|
|
|
|
resource banner-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-custom-name: func() -> option<string>;
|
|
}
|
|
|
|
resource barrel-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
viewer-count: func() -> u32;
|
|
}
|
|
|
|
resource beacon-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
get-primary-effect: func() -> s32;
|
|
get-secondary-effect: func() -> s32;
|
|
get-levels: func() -> s32;
|
|
}
|
|
|
|
resource bed-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource beehive-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-bee-count: func() -> u32;
|
|
}
|
|
|
|
resource bell-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
is-ringing: func() -> bool;
|
|
get-ring-ticks: func() -> s32;
|
|
}
|
|
|
|
resource blasting-furnace-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
get-cooking-time-spent: func() -> u16;
|
|
get-cooking-total-time: func() -> u16;
|
|
get-lit-time-remaining: func() -> u16;
|
|
get-lit-total-time: func() -> u16;
|
|
is-burning: func() -> bool;
|
|
}
|
|
|
|
resource brewing-stand-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
get-brew-time: func() -> s32;
|
|
get-fuel: func() -> s32;
|
|
}
|
|
|
|
resource brushable-block-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource calibrated-sculk-sensor-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource campfire-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
}
|
|
|
|
resource chiseled-bookshelf-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
get-last-interacted-slot: func() -> s8;
|
|
}
|
|
|
|
resource comparator-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-output-signal: func() -> u8;
|
|
}
|
|
|
|
resource conduit-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource copper-golem-statue-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource crafter-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
get-crafting-ticks-remaining: func() -> s32;
|
|
is-triggered: func() -> bool;
|
|
}
|
|
|
|
resource creaking-heart-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-creaking-uuid: func() -> option<string>;
|
|
}
|
|
|
|
resource daylight-detector-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource decorated-pot-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource dispenser-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
}
|
|
|
|
resource dropper-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
}
|
|
|
|
resource enchanting-table-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource end-gateway-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-age: func() -> s64;
|
|
is-exact-teleport: func() -> bool;
|
|
}
|
|
|
|
resource end-portal-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource ender-chest-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
viewer-count: func() -> u32;
|
|
}
|
|
|
|
resource furnace-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
get-cooking-time-spent: func() -> u16;
|
|
get-cooking-total-time: func() -> u16;
|
|
get-lit-time-remaining: func() -> u16;
|
|
get-lit-total-time: func() -> u16;
|
|
is-burning: func() -> bool;
|
|
}
|
|
|
|
resource hopper-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
get-cooldown: func() -> s32;
|
|
}
|
|
|
|
resource jigsaw-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-name: func() -> string;
|
|
get-target: func() -> string;
|
|
get-pool: func() -> string;
|
|
get-final-state: func() -> string;
|
|
get-selection-priority: func() -> s32;
|
|
get-placement-priority: func() -> s32;
|
|
}
|
|
|
|
resource lectern-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
get-page: func() -> u32;
|
|
}
|
|
|
|
resource piston-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-progress: func() -> f32;
|
|
is-extending: func() -> bool;
|
|
is-source: func() -> bool;
|
|
}
|
|
|
|
resource potent-sulfur-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource sculk-catalyst-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource sculk-sensor-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource sculk-shrieker-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-warning-level: func() -> s32;
|
|
}
|
|
|
|
resource shelf-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
}
|
|
|
|
resource shulker-box-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
viewer-count: func() -> u32;
|
|
}
|
|
|
|
resource skull-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-note-block-sound: func() -> option<string>;
|
|
}
|
|
|
|
resource smoker-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-container: func() -> container-block-entity;
|
|
get-cooking-time-spent: func() -> u16;
|
|
get-cooking-total-time: func() -> u16;
|
|
get-lit-time-remaining: func() -> u16;
|
|
get-lit-total-time: func() -> u16;
|
|
is-burning: func() -> bool;
|
|
}
|
|
|
|
resource structure-block-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
get-name: func() -> string;
|
|
get-author: func() -> string;
|
|
get-mode: func() -> string;
|
|
get-integrity: func() -> f32;
|
|
get-seed: func() -> s64;
|
|
}
|
|
|
|
resource test-block-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource test-instance-block-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource trial-spawner-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
resource vault-block-entity {
|
|
get-block-entity: func() -> block-entity;
|
|
}
|
|
|
|
variant block-entity-type {
|
|
command-block-entity(command-block-entity),
|
|
sign-block-entity(sign-block-entity),
|
|
hanging-sign-block-entity(hanging-sign-block-entity),
|
|
jukebox-block-entity(jukebox-block-entity),
|
|
chest-block-entity(chest-block-entity),
|
|
trapped-chest-block-entity(trapped-chest-block-entity),
|
|
mob-spawner-block-entity(mob-spawner-block-entity),
|
|
map-block-entity(map-block-entity),
|
|
banner-block-entity(banner-block-entity),
|
|
barrel-block-entity(barrel-block-entity),
|
|
beacon-block-entity(beacon-block-entity),
|
|
bed-block-entity(bed-block-entity),
|
|
beehive-block-entity(beehive-block-entity),
|
|
bell-block-entity(bell-block-entity),
|
|
blasting-furnace-block-entity(blasting-furnace-block-entity),
|
|
brewing-stand-block-entity(brewing-stand-block-entity),
|
|
brushable-block-block-entity(brushable-block-block-entity),
|
|
calibrated-sculk-sensor-block-entity(calibrated-sculk-sensor-block-entity),
|
|
campfire-block-entity(campfire-block-entity),
|
|
chiseled-bookshelf-block-entity(chiseled-bookshelf-block-entity),
|
|
comparator-block-entity(comparator-block-entity),
|
|
conduit-block-entity(conduit-block-entity),
|
|
copper-golem-statue-block-entity(copper-golem-statue-block-entity),
|
|
crafter-block-entity(crafter-block-entity),
|
|
creaking-heart-block-entity(creaking-heart-block-entity),
|
|
daylight-detector-block-entity(daylight-detector-block-entity),
|
|
decorated-pot-block-entity(decorated-pot-block-entity),
|
|
dispenser-block-entity(dispenser-block-entity),
|
|
dropper-block-entity(dropper-block-entity),
|
|
enchanting-table-block-entity(enchanting-table-block-entity),
|
|
end-gateway-block-entity(end-gateway-block-entity),
|
|
end-portal-block-entity(end-portal-block-entity),
|
|
ender-chest-block-entity(ender-chest-block-entity),
|
|
furnace-block-entity(furnace-block-entity),
|
|
hopper-block-entity(hopper-block-entity),
|
|
jigsaw-block-entity(jigsaw-block-entity),
|
|
lectern-block-entity(lectern-block-entity),
|
|
piston-block-entity(piston-block-entity),
|
|
potent-sulfur-block-entity(potent-sulfur-block-entity),
|
|
sculk-catalyst-block-entity(sculk-catalyst-block-entity),
|
|
sculk-sensor-block-entity(sculk-sensor-block-entity),
|
|
sculk-shrieker-block-entity(sculk-shrieker-block-entity),
|
|
shelf-block-entity(shelf-block-entity),
|
|
shulker-box-block-entity(shulker-box-block-entity),
|
|
skull-block-entity(skull-block-entity),
|
|
smoker-block-entity(smoker-block-entity),
|
|
structure-block-block-entity(structure-block-block-entity),
|
|
test-block-block-entity(test-block-block-entity),
|
|
test-instance-block-block-entity(test-instance-block-block-entity),
|
|
trial-spawner-block-entity(trial-spawner-block-entity),
|
|
vault-block-entity(vault-block-entity),
|
|
container-block-entity(container-block-entity),
|
|
}
|
|
}
|