234 lines
4.0 KiB
Plaintext
234 lines
4.0 KiB
Plaintext
/// Provides common types and utilities used across the entire plugin API.
|
|
interface common {
|
|
/// Serialized text component as a postcard byte array.
|
|
/// @deprecated Use the text-component resource from the text interface instead.
|
|
type raw-text-component = list<u8>;
|
|
|
|
/// A position in the world grid (integers).
|
|
record block-pos {
|
|
x: s32,
|
|
y: s32,
|
|
z: s32,
|
|
}
|
|
|
|
/// A precise coordinate in the world (floats).
|
|
type position = tuple<f64, f64, f64>;
|
|
|
|
/// Represents the hands of a player.
|
|
enum hand {
|
|
left,
|
|
right,
|
|
}
|
|
|
|
/// Represents the game modes available in Minecraft.
|
|
enum game-mode {
|
|
survival,
|
|
creative,
|
|
adventure,
|
|
spectator,
|
|
}
|
|
|
|
/// The 16 base Minecraft colors.
|
|
enum named-color {
|
|
black,
|
|
dark-blue,
|
|
dark-green,
|
|
dark-aqua,
|
|
dark-red,
|
|
dark-purple,
|
|
gold,
|
|
gray,
|
|
dark-gray,
|
|
blue,
|
|
green,
|
|
aqua,
|
|
red,
|
|
light-purple,
|
|
yellow,
|
|
white,
|
|
}
|
|
|
|
/// An RGB color represented by its red, green, and blue components.
|
|
record rgb-color {
|
|
r: u8,
|
|
g: u8,
|
|
b: u8,
|
|
}
|
|
|
|
/// An ARGB color with alpha (transparency) channel.
|
|
record argb-color {
|
|
a: u8,
|
|
r: u8,
|
|
g: u8,
|
|
b: u8,
|
|
}
|
|
|
|
/// Represents the type of click interaction in a GUI.
|
|
enum click-type {
|
|
left,
|
|
right,
|
|
shift-left,
|
|
shift-right,
|
|
middle,
|
|
drop,
|
|
control-drop,
|
|
double-click,
|
|
number-key,
|
|
unknown,
|
|
}
|
|
|
|
/// Represents the various poses an entity can be in.
|
|
enum entity-pose {
|
|
standing,
|
|
fall-flying,
|
|
sleeping,
|
|
swimming,
|
|
spin-attack,
|
|
crouching,
|
|
long-jumping,
|
|
dying,
|
|
croaking,
|
|
using-tongue,
|
|
sitting,
|
|
roaring,
|
|
sniffing,
|
|
emerging,
|
|
digging,
|
|
sliding,
|
|
shooting,
|
|
inhaling,
|
|
}
|
|
|
|
/// All Minecraft-supported locales.
|
|
enum locale {
|
|
af-za,
|
|
ar-sa,
|
|
ast-es,
|
|
az-az,
|
|
ba-ru,
|
|
bar,
|
|
be-by,
|
|
bg-bg,
|
|
br-fr,
|
|
brb,
|
|
bs-ba,
|
|
ca-es,
|
|
cs-cz,
|
|
cy-gb,
|
|
da-dk,
|
|
de-at,
|
|
de-ch,
|
|
de-de,
|
|
el-gr,
|
|
en-au,
|
|
en-ca,
|
|
en-gb,
|
|
en-nz,
|
|
en-pt,
|
|
en-ud,
|
|
en-us,
|
|
enp,
|
|
enws,
|
|
eo-uy,
|
|
es-ar,
|
|
es-cl,
|
|
es-ec,
|
|
es-es,
|
|
es-mx,
|
|
es-uy,
|
|
es-ve,
|
|
esan,
|
|
et-ee,
|
|
eu-es,
|
|
fa-ir,
|
|
fi-fi,
|
|
fil-ph,
|
|
fo-fo,
|
|
fr-ca,
|
|
fr-fr,
|
|
fra-de,
|
|
fur-it,
|
|
fy-nl,
|
|
ga-ie,
|
|
gd-gb,
|
|
gl-es,
|
|
haw-us,
|
|
he-il,
|
|
hi-in,
|
|
hr-hr,
|
|
hu-hu,
|
|
hy-am,
|
|
id-id,
|
|
ig-ng,
|
|
io-en,
|
|
is-is,
|
|
isv,
|
|
it-it,
|
|
ja-jp,
|
|
jbo-en,
|
|
ka-ge,
|
|
kk-kz,
|
|
kn-in,
|
|
ko-kr,
|
|
ksh,
|
|
kw-gb,
|
|
la-la,
|
|
lb-lu,
|
|
li-li,
|
|
lmo,
|
|
lo-la,
|
|
lol-us,
|
|
lt-lt,
|
|
lv-lv,
|
|
lzh,
|
|
mk-mk,
|
|
mn-mn,
|
|
ms-my,
|
|
mt-mt,
|
|
nah,
|
|
nds-de,
|
|
nl-be,
|
|
nl-nl,
|
|
nn-no,
|
|
no-no,
|
|
oc-fr,
|
|
ovd,
|
|
pl-pl,
|
|
pt-br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