interface %world { use common.{position}; use text.{text-component}; use scoreboard.{scoreboard}; enum piston-behavior { normal, destroy, block, ignore, push-only } flags block-flags { notify-neighbors, notify-listeners, force-state, skip-drops, moved, skip-redstone-wire-state-replacement, skip-block-entity-replaced-callback, skip-block-added-callback, } record block-state { id: u16, luminance: u8, opacity: u8, hardness: f32, is-air: bool, is-liquid: bool, is-solid: bool, is-full-cube: bool, piston-behavior: piston-behavior, has-random-ticks: bool, } record block-state-id { id: u16, } record block-pos { x: s32, y: s32, z: s32, } resource %world { get-id: func() -> string; get-block-state-id: func(pos: block-pos) -> u16; get-block-state: func(pos: block-pos) -> block-state; set-block-state: func(pos: block-pos, state: u16, update-flags: block-flags); get-time-of-day: func() -> u64; set-time-of-day: func(time: u64); get-world-age: func() -> u64; get-dimension: func() -> string; get-top-block-y: func(x: s32, z: s32) -> s32; get-motion-blocking-height: func(x: s32, z: s32) -> s32; is-raining: func() -> bool; set-raining: func(raining: bool); is-thundering: func() -> bool; set-thundering: func(thundering: bool); broadcast-system-message: func(message: text-component, overlay: bool); get-scoreboard: func() -> scoreboard; } }