add more stuff
This commit is contained in:
parent
a1ba8b3db2
commit
f481f5677d
File diff suppressed because it is too large
Load Diff
68
v0.1/entity-statuses.wit
Normal file
68
v0.1/entity-statuses.wit
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
package pumpkin:plugin@0.1.0;
|
||||||
|
|
||||||
|
interface entity-statuses {
|
||||||
|
enum entity-status {
|
||||||
|
armadillo-peek,
|
||||||
|
armorstand-wobble,
|
||||||
|
body-break,
|
||||||
|
cancel-shake-wetness,
|
||||||
|
chest-break,
|
||||||
|
death,
|
||||||
|
dolphin-looking-for-treasure,
|
||||||
|
drown-particles,
|
||||||
|
eat-grass,
|
||||||
|
end-ram,
|
||||||
|
feet-break,
|
||||||
|
fireworks-explode,
|
||||||
|
fishing-rod-reel-in,
|
||||||
|
fox-eat,
|
||||||
|
full-debug-info,
|
||||||
|
guardian-attack-sound,
|
||||||
|
head-break,
|
||||||
|
honey-jump,
|
||||||
|
honey-slide,
|
||||||
|
in-love-hearts,
|
||||||
|
jump,
|
||||||
|
kinetic-hit,
|
||||||
|
legs-break,
|
||||||
|
love-hearts,
|
||||||
|
mainhand-break,
|
||||||
|
offer-flower,
|
||||||
|
offhand-break,
|
||||||
|
permission-level-admins,
|
||||||
|
permission-level-all,
|
||||||
|
permission-level-gamemasters,
|
||||||
|
permission-level-moderators,
|
||||||
|
permission-level-owners,
|
||||||
|
poof,
|
||||||
|
protected-from-death,
|
||||||
|
ravager-roared,
|
||||||
|
ravager-stunned,
|
||||||
|
reduced-debug-info,
|
||||||
|
saddle-break,
|
||||||
|
shake,
|
||||||
|
shake-wetness,
|
||||||
|
silverfish-merge-anim,
|
||||||
|
sniffer-digging-sound,
|
||||||
|
sonic-charge,
|
||||||
|
squid-anim-synch,
|
||||||
|
start-attacking,
|
||||||
|
start-ram,
|
||||||
|
stop-attacking,
|
||||||
|
stop-offer-flower,
|
||||||
|
swap-hands,
|
||||||
|
taming-failed,
|
||||||
|
taming-succeeded,
|
||||||
|
teleport,
|
||||||
|
tendrils-shiver,
|
||||||
|
tnt-prime,
|
||||||
|
trusting-failed,
|
||||||
|
trusting-succeeded,
|
||||||
|
use-item-complete,
|
||||||
|
villager-angry,
|
||||||
|
villager-happy,
|
||||||
|
villager-sweat,
|
||||||
|
witch-hat-magic,
|
||||||
|
zombie-converting,
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -54,6 +54,7 @@ interface event {
|
|||||||
player: player,
|
player: player,
|
||||||
message: string,
|
message: string,
|
||||||
recipients: list<player>,
|
recipients: list<player>,
|
||||||
|
signature: option<list<u8>>,
|
||||||
cancelled: bool
|
cancelled: bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
67
v0.1/game-events.wit
Normal file
67
v0.1/game-events.wit
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
package pumpkin:plugin@0.1.0;
|
||||||
|
|
||||||
|
interface game-events {
|
||||||
|
enum game-event {
|
||||||
|
block-activate,
|
||||||
|
block-attach,
|
||||||
|
block-change,
|
||||||
|
block-close,
|
||||||
|
block-deactivate,
|
||||||
|
block-destroy,
|
||||||
|
block-detach,
|
||||||
|
block-open,
|
||||||
|
block-place,
|
||||||
|
bounce,
|
||||||
|
container-close,
|
||||||
|
container-open,
|
||||||
|
drink,
|
||||||
|
eat,
|
||||||
|
elytra-glide,
|
||||||
|
entity-damage,
|
||||||
|
entity-die,
|
||||||
|
entity-dismount,
|
||||||
|
entity-interact,
|
||||||
|
entity-mount,
|
||||||
|
entity-place,
|
||||||
|
entity-action,
|
||||||
|
equip,
|
||||||
|
explode,
|
||||||
|
flap,
|
||||||
|
fluid-pickup,
|
||||||
|
fluid-place,
|
||||||
|
hit-ground,
|
||||||
|
instrument-play,
|
||||||
|
item-interact-finish,
|
||||||
|
item-interact-start,
|
||||||
|
jukebox-play,
|
||||||
|
jukebox-stop-play,
|
||||||
|
lightning-strike,
|
||||||
|
note-block-play,
|
||||||
|
prime-fuse,
|
||||||
|
projectile-land,
|
||||||
|
projectile-shoot,
|
||||||
|
sculk-sensor-tendrils-clicking,
|
||||||
|
shear,
|
||||||
|
shriek,
|
||||||
|
splash,
|
||||||
|
step,
|
||||||
|
swim,
|
||||||
|
teleport,
|
||||||
|
unequip,
|
||||||
|
resonate-1,
|
||||||
|
resonate-2,
|
||||||
|
resonate-3,
|
||||||
|
resonate-4,
|
||||||
|
resonate-5,
|
||||||
|
resonate-6,
|
||||||
|
resonate-7,
|
||||||
|
resonate-8,
|
||||||
|
resonate-9,
|
||||||
|
resonate-10,
|
||||||
|
resonate-11,
|
||||||
|
resonate-12,
|
||||||
|
resonate-13,
|
||||||
|
resonate-14,
|
||||||
|
resonate-15,
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
interface item-stack {
|
interface item-stack {
|
||||||
|
use attributes.{attribute, attribute-modifier};
|
||||||
use data-components.{data-component};
|
use data-components.{data-component};
|
||||||
use enchantments.{enchantment};
|
use enchantments.{attribute-modifier-slot, enchantment};
|
||||||
use text.{text-component};
|
use text.{text-component};
|
||||||
|
|
||||||
/// Represents an enchantment and its level.
|
/// Represents an enchantment and its level.
|
||||||
@ -15,6 +16,13 @@ interface item-stack {
|
|||||||
level: u32,
|
level: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Represents an attribute modifier applied to an item stack for a specific slot.
|
||||||
|
record item-attribute-modifier {
|
||||||
|
attribute: attribute,
|
||||||
|
modifier: attribute-modifier,
|
||||||
|
slot: attribute-modifier-slot,
|
||||||
|
}
|
||||||
|
|
||||||
/// Represents a data component and its serialized value.
|
/// Represents a data component and its serialized value.
|
||||||
record data-component-value {
|
record data-component-value {
|
||||||
component: data-component,
|
component: data-component,
|
||||||
@ -56,6 +64,15 @@ interface item-stack {
|
|||||||
/// Returns whether this item stack has a specific custom enchantment.
|
/// Returns whether this item stack has a specific custom enchantment.
|
||||||
has-custom-enchantment: func(enchantment-id: string) -> bool;
|
has-custom-enchantment: func(enchantment-id: string) -> bool;
|
||||||
|
|
||||||
|
/// Returns all attribute modifiers on this item stack.
|
||||||
|
get-attribute-modifiers: func() -> list<item-attribute-modifier>;
|
||||||
|
/// Adds an attribute modifier to this item stack.
|
||||||
|
add-attribute-modifier: func(modifier: item-attribute-modifier);
|
||||||
|
/// Removes all attribute modifiers for a specific attribute from this item stack.
|
||||||
|
remove-attribute-modifiers: func(attribute: attribute);
|
||||||
|
/// Clears all custom attribute modifiers from this item stack.
|
||||||
|
clear-attribute-modifiers: func();
|
||||||
|
|
||||||
/// Returns the lore of this item stack.
|
/// Returns the lore of this item stack.
|
||||||
get-lore: func() -> list<text-component>;
|
get-lore: func() -> list<text-component>;
|
||||||
/// Sets the lore of this item stack.
|
/// Sets the lore of this item stack.
|
||||||
|
|||||||
@ -34,6 +34,17 @@ interface java-packets {
|
|||||||
record config-s-config-pong {
|
record config-s-config-pong {
|
||||||
id: s32,
|
id: s32,
|
||||||
}
|
}
|
||||||
|
variant resource-pack-response-result {
|
||||||
|
download-success,
|
||||||
|
download-fail,
|
||||||
|
downloaded,
|
||||||
|
accepted,
|
||||||
|
declined,
|
||||||
|
invalid-url,
|
||||||
|
reload-failed,
|
||||||
|
discarded,
|
||||||
|
unknown(s32),
|
||||||
|
}
|
||||||
record config-s-config-resource-pack {
|
record config-s-config-resource-pack {
|
||||||
uuid: uuid,
|
uuid: uuid,
|
||||||
%result: s32,
|
%result: s32,
|
||||||
@ -42,6 +53,10 @@ interface java-packets {
|
|||||||
key: string,
|
key: string,
|
||||||
payload: option<list<u8>>,
|
payload: option<list<u8>>,
|
||||||
}
|
}
|
||||||
|
record s-encryption-response {
|
||||||
|
shared-secret: list<u8>,
|
||||||
|
verify-token: list<u8>,
|
||||||
|
}
|
||||||
record login-s-login-start {
|
record login-s-login-start {
|
||||||
name: string,
|
name: string,
|
||||||
uuid: uuid,
|
uuid: uuid,
|
||||||
@ -73,11 +88,15 @@ interface java-packets {
|
|||||||
record s-chat-command {
|
record s-chat-command {
|
||||||
command: string,
|
command: string,
|
||||||
}
|
}
|
||||||
|
record argument-signature {
|
||||||
|
name: string,
|
||||||
|
signature: list<u8>,
|
||||||
|
}
|
||||||
record s-chat-command-signed {
|
record s-chat-command-signed {
|
||||||
command: string,
|
command: string,
|
||||||
timestamp: s64,
|
timestamp: s64,
|
||||||
salt: s64,
|
salt: s64,
|
||||||
argument-signatures: list<string>,
|
argument-signatures: list<argument-signature>,
|
||||||
message-count: s32,
|
message-count: s32,
|
||||||
acknowledged: list<u8>,
|
acknowledged: list<u8>,
|
||||||
checksum: u8,
|
checksum: u8,
|
||||||
@ -99,11 +118,20 @@ interface java-packets {
|
|||||||
revision: s32,
|
revision: s32,
|
||||||
slot: s32,
|
slot: s32,
|
||||||
button: u8,
|
button: u8,
|
||||||
mode: string,
|
mode: slot-action-type,
|
||||||
length-of-array: s32,
|
length-of-array: s32,
|
||||||
array-of-changed-slots: list<string>,
|
array-of-changed-slots: list<tuple<s32, string>>,
|
||||||
carried-item: string,
|
carried-item: string,
|
||||||
}
|
}
|
||||||
|
enum slot-action-type {
|
||||||
|
pickup,
|
||||||
|
quick-move,
|
||||||
|
swap,
|
||||||
|
clone,
|
||||||
|
throw,
|
||||||
|
quick-craft,
|
||||||
|
pickup-all,
|
||||||
|
}
|
||||||
record s-client-command {
|
record s-client-command {
|
||||||
action-id: s32,
|
action-id: s32,
|
||||||
}
|
}
|
||||||
@ -124,6 +152,9 @@ interface java-packets {
|
|||||||
id: s32,
|
id: s32,
|
||||||
command: string,
|
command: string,
|
||||||
}
|
}
|
||||||
|
record s-confirm-teleport {
|
||||||
|
teleport-id: s32,
|
||||||
|
}
|
||||||
record s-container-button-click {
|
record s-container-button-click {
|
||||||
window-id: s32,
|
window-id: s32,
|
||||||
button-id: s32,
|
button-id: s32,
|
||||||
@ -167,6 +198,11 @@ interface java-packets {
|
|||||||
hand: option<s32>,
|
hand: option<s32>,
|
||||||
sneaking: bool,
|
sneaking: bool,
|
||||||
}
|
}
|
||||||
|
enum action-type {
|
||||||
|
interact,
|
||||||
|
attack,
|
||||||
|
interact-at,
|
||||||
|
}
|
||||||
record s-jigsaw-generate {
|
record s-jigsaw-generate {
|
||||||
pos: tuple<s32, s32, s32>,
|
pos: tuple<s32, s32, s32>,
|
||||||
levels: s32,
|
levels: s32,
|
||||||
@ -217,11 +253,32 @@ interface java-packets {
|
|||||||
face: u8,
|
face: u8,
|
||||||
sequence: s32,
|
sequence: s32,
|
||||||
}
|
}
|
||||||
|
enum status {
|
||||||
|
started-digging,
|
||||||
|
cancelled-digging,
|
||||||
|
finished-digging,
|
||||||
|
drop-item-stack,
|
||||||
|
drop-item,
|
||||||
|
release-item-in-use,
|
||||||
|
swap-item,
|
||||||
|
spear-jab,
|
||||||
|
}
|
||||||
record s-player-command {
|
record s-player-command {
|
||||||
entity-id: s32,
|
entity-id: s32,
|
||||||
action: string,
|
action: action,
|
||||||
jump-boost: s32,
|
jump-boost: s32,
|
||||||
}
|
}
|
||||||
|
enum action {
|
||||||
|
start-sneaking,
|
||||||
|
stop-sneaking,
|
||||||
|
leave-bed,
|
||||||
|
start-sprinting,
|
||||||
|
stop-sprinting,
|
||||||
|
start-horse-jump,
|
||||||
|
stop-horse-jump,
|
||||||
|
open-vehicle-inventory,
|
||||||
|
start-flying-elytra,
|
||||||
|
}
|
||||||
record s-set-player-ground {
|
record s-set-player-ground {
|
||||||
on-ground: bool,
|
on-ground: bool,
|
||||||
}
|
}
|
||||||
@ -263,6 +320,17 @@ interface java-packets {
|
|||||||
record s-rename-item {
|
record s-rename-item {
|
||||||
item-name: string,
|
item-name: string,
|
||||||
}
|
}
|
||||||
|
variant play-resource-pack-result {
|
||||||
|
download-success,
|
||||||
|
declined,
|
||||||
|
download-fail,
|
||||||
|
accepted,
|
||||||
|
downloaded,
|
||||||
|
invalid-url,
|
||||||
|
reload-failed,
|
||||||
|
discarded,
|
||||||
|
unknown(s32),
|
||||||
|
}
|
||||||
record s-play-resource-pack {
|
record s-play-resource-pack {
|
||||||
uuid: uuid,
|
uuid: uuid,
|
||||||
%result: s32,
|
%result: s32,
|
||||||
@ -284,6 +352,11 @@ interface java-packets {
|
|||||||
mode: s32,
|
mode: s32,
|
||||||
%flags: u8,
|
%flags: u8,
|
||||||
}
|
}
|
||||||
|
enum command-block-mode {
|
||||||
|
chain,
|
||||||
|
repeating,
|
||||||
|
impulse,
|
||||||
|
}
|
||||||
record s-set-command-minecart {
|
record s-set-command-minecart {
|
||||||
entity-id: s32,
|
entity-id: s32,
|
||||||
command: string,
|
command: string,
|
||||||
@ -293,8 +366,12 @@ interface java-packets {
|
|||||||
slot: s32,
|
slot: s32,
|
||||||
clicked-item: string,
|
clicked-item: string,
|
||||||
}
|
}
|
||||||
|
record game-rule-entry {
|
||||||
|
game-rule-key: string,
|
||||||
|
value: string,
|
||||||
|
}
|
||||||
record s-set-game-rule {
|
record s-set-game-rule {
|
||||||
entries: list<string>,
|
entries: list<game-rule-entry>,
|
||||||
}
|
}
|
||||||
record s-set-held-item {
|
record s-set-held-item {
|
||||||
slot: s32,
|
slot: s32,
|
||||||
@ -329,9 +406,15 @@ interface java-packets {
|
|||||||
}
|
}
|
||||||
record s-set-test-block {
|
record s-set-test-block {
|
||||||
position: tuple<s32, s32, s32>,
|
position: tuple<s32, s32, s32>,
|
||||||
mode: string,
|
mode: test-block-mode,
|
||||||
message: string,
|
message: string,
|
||||||
}
|
}
|
||||||
|
enum test-block-mode {
|
||||||
|
start,
|
||||||
|
log,
|
||||||
|
fail,
|
||||||
|
accept,
|
||||||
|
}
|
||||||
record s-spectate-entity {
|
record s-spectate-entity {
|
||||||
target: uuid,
|
target: uuid,
|
||||||
}
|
}
|
||||||
@ -343,8 +426,36 @@ interface java-packets {
|
|||||||
}
|
}
|
||||||
record s-test-instance-block-action {
|
record s-test-instance-block-action {
|
||||||
pos: tuple<s32, s32, s32>,
|
pos: tuple<s32, s32, s32>,
|
||||||
action: string,
|
action: test-instance-block-action,
|
||||||
data: string,
|
data: test-instance-block-data,
|
||||||
|
}
|
||||||
|
enum test-instance-block-action {
|
||||||
|
init,
|
||||||
|
query,
|
||||||
|
set,
|
||||||
|
reset,
|
||||||
|
save,
|
||||||
|
%export,
|
||||||
|
run,
|
||||||
|
}
|
||||||
|
record var-int-vector3 {
|
||||||
|
x: s32,
|
||||||
|
y: s32,
|
||||||
|
z: s32,
|
||||||
|
}
|
||||||
|
record test-instance-block-data {
|
||||||
|
test: option<string>,
|
||||||
|
size: var-int-vector3,
|
||||||
|
rotation: string,
|
||||||
|
ignore-entities: bool,
|
||||||
|
status: test-instance-block-status,
|
||||||
|
error-message: option<string>,
|
||||||
|
}
|
||||||
|
enum test-instance-block-status {
|
||||||
|
cleared,
|
||||||
|
running,
|
||||||
|
success,
|
||||||
|
failed,
|
||||||
}
|
}
|
||||||
record s-update-sign {
|
record s-update-sign {
|
||||||
location: tuple<s32, s32, s32>,
|
location: tuple<s32, s32, s32>,
|
||||||
@ -389,7 +500,7 @@ interface java-packets {
|
|||||||
key: string,
|
key: string,
|
||||||
}
|
}
|
||||||
record config-c-config-custom-report-details {
|
record config-c-config-custom-report-details {
|
||||||
details: list<string>,
|
details: list<tuple<string, string>>,
|
||||||
}
|
}
|
||||||
record config-c-feature-flags {
|
record config-c-feature-flags {
|
||||||
features: list<string>,
|
features: list<string>,
|
||||||
@ -431,9 +542,22 @@ interface java-packets {
|
|||||||
record login-c-login-cookie-request {
|
record login-c-login-cookie-request {
|
||||||
key: string,
|
key: string,
|
||||||
}
|
}
|
||||||
|
record c-encryption-request {
|
||||||
|
server-id: string,
|
||||||
|
public-key: list<u8>,
|
||||||
|
verify-token: list<u8>,
|
||||||
|
should-authenticate: bool,
|
||||||
|
}
|
||||||
record login-c-login-disconnect {
|
record login-c-login-disconnect {
|
||||||
json-reason: string,
|
json-reason: string,
|
||||||
}
|
}
|
||||||
|
record c-login-success {
|
||||||
|
uuid: uuid,
|
||||||
|
username: string,
|
||||||
|
properties: list<property>,
|
||||||
|
strict-error-handling: bool,
|
||||||
|
session-id: uuid,
|
||||||
|
}
|
||||||
record login-c-login-plugin-request {
|
record login-c-login-plugin-request {
|
||||||
message-id: s32,
|
message-id: s32,
|
||||||
channel: string,
|
channel: string,
|
||||||
@ -456,7 +580,12 @@ interface java-packets {
|
|||||||
prompt-message: option<string>,
|
prompt-message: option<string>,
|
||||||
}
|
}
|
||||||
record c-award-stats {
|
record c-award-stats {
|
||||||
stats: list<string>,
|
stats: list<statistic>,
|
||||||
|
}
|
||||||
|
record statistic {
|
||||||
|
category-id: s32,
|
||||||
|
statistic-id: s32,
|
||||||
|
value: s32,
|
||||||
}
|
}
|
||||||
record c-set-block-destroy-stage {
|
record c-set-block-destroy-stage {
|
||||||
entity-id: s32,
|
entity-id: s32,
|
||||||
@ -480,7 +609,26 @@ interface java-packets {
|
|||||||
}
|
}
|
||||||
record c-boss-event {
|
record c-boss-event {
|
||||||
uuid: uuid,
|
uuid: uuid,
|
||||||
action: string,
|
action: bossevent-action,
|
||||||
|
}
|
||||||
|
record bossevent-action-add {
|
||||||
|
title: string,
|
||||||
|
health: f32,
|
||||||
|
color: s32,
|
||||||
|
division: s32,
|
||||||
|
%flags: u8,
|
||||||
|
}
|
||||||
|
record bossevent-action-update-style {
|
||||||
|
color: s32,
|
||||||
|
dividers: s32,
|
||||||
|
}
|
||||||
|
variant bossevent-action {
|
||||||
|
add(bossevent-action-add),
|
||||||
|
remove,
|
||||||
|
update-health(f32),
|
||||||
|
update-tile(string),
|
||||||
|
update-style(bossevent-action-update-style),
|
||||||
|
update-flags(u8),
|
||||||
}
|
}
|
||||||
record c-center-chunk {
|
record c-center-chunk {
|
||||||
chunk-x: s32,
|
chunk-x: s32,
|
||||||
@ -493,8 +641,13 @@ interface java-packets {
|
|||||||
record c-chunk-batch-end {
|
record c-chunk-batch-end {
|
||||||
batch-size: s32,
|
batch-size: s32,
|
||||||
}
|
}
|
||||||
|
record chunk-biome-entry {
|
||||||
|
chunk-x: s32,
|
||||||
|
chunk-z: s32,
|
||||||
|
data: list<u8>,
|
||||||
|
}
|
||||||
record c-chunks-biomes {
|
record c-chunks-biomes {
|
||||||
chunks: list<string>,
|
chunks: list<chunk-biome-entry>,
|
||||||
}
|
}
|
||||||
record c-clear-title {
|
record c-clear-title {
|
||||||
reset: bool,
|
reset: bool,
|
||||||
@ -513,12 +666,146 @@ interface java-packets {
|
|||||||
id: s32,
|
id: s32,
|
||||||
start: s32,
|
start: s32,
|
||||||
length: s32,
|
length: s32,
|
||||||
matches: list<string>,
|
matches: list<command-suggestion>,
|
||||||
|
}
|
||||||
|
record command-suggestion {
|
||||||
|
suggestion: string,
|
||||||
|
tooltip: option<string>,
|
||||||
}
|
}
|
||||||
record c-commands {
|
record c-commands {
|
||||||
nodes: list<string>,
|
nodes: list<proto-node>,
|
||||||
root-node-index: s32,
|
root-node-index: s32,
|
||||||
}
|
}
|
||||||
|
record proto-node {
|
||||||
|
children: list<s32>,
|
||||||
|
node-type: proto-node-type,
|
||||||
|
}
|
||||||
|
record proto-node-type-literal {
|
||||||
|
name: string,
|
||||||
|
is-executable: bool,
|
||||||
|
redirect-target: option<s32>,
|
||||||
|
restricted: bool,
|
||||||
|
}
|
||||||
|
record proto-node-type-argument {
|
||||||
|
name: string,
|
||||||
|
is-executable: bool,
|
||||||
|
redirect-target: option<s32>,
|
||||||
|
parser: argument-type,
|
||||||
|
override-suggestion-type: option<suggestion-providers>,
|
||||||
|
restricted: bool,
|
||||||
|
}
|
||||||
|
variant proto-node-type {
|
||||||
|
root,
|
||||||
|
literal(proto-node-type-literal),
|
||||||
|
argument(proto-node-type-argument),
|
||||||
|
}
|
||||||
|
record argument-type-float {
|
||||||
|
min: option<f32>,
|
||||||
|
max: option<f32>,
|
||||||
|
}
|
||||||
|
record argument-type-double {
|
||||||
|
min: option<f64>,
|
||||||
|
max: option<f64>,
|
||||||
|
}
|
||||||
|
record argument-type-integer {
|
||||||
|
min: option<s32>,
|
||||||
|
max: option<s32>,
|
||||||
|
}
|
||||||
|
record argument-type-long {
|
||||||
|
min: option<s64>,
|
||||||
|
max: option<s64>,
|
||||||
|
}
|
||||||
|
record argument-type-entity {
|
||||||
|
%flags: u8,
|
||||||
|
}
|
||||||
|
record argument-type-score-holder {
|
||||||
|
%flags: u8,
|
||||||
|
}
|
||||||
|
record argument-type-time {
|
||||||
|
min: s32,
|
||||||
|
}
|
||||||
|
record argument-type-resource-or-tag {
|
||||||
|
identifier: string,
|
||||||
|
}
|
||||||
|
record argument-type-resource-or-tag-key {
|
||||||
|
identifier: string,
|
||||||
|
}
|
||||||
|
record argument-type-resource {
|
||||||
|
identifier: string,
|
||||||
|
}
|
||||||
|
record argument-type-resource-key {
|
||||||
|
identifier: string,
|
||||||
|
}
|
||||||
|
variant argument-type {
|
||||||
|
%bool,
|
||||||
|
float(argument-type-float),
|
||||||
|
double(argument-type-double),
|
||||||
|
integer(argument-type-integer),
|
||||||
|
long(argument-type-long),
|
||||||
|
%string(string-proto-arg-behavior),
|
||||||
|
entity(argument-type-entity),
|
||||||
|
game-profile,
|
||||||
|
block-pos,
|
||||||
|
column-pos,
|
||||||
|
vec3,
|
||||||
|
vec2,
|
||||||
|
block-state,
|
||||||
|
block-predicate,
|
||||||
|
item-stack,
|
||||||
|
item-predicate,
|
||||||
|
color,
|
||||||
|
hex-color,
|
||||||
|
component,
|
||||||
|
style,
|
||||||
|
message,
|
||||||
|
nbt-compound,
|
||||||
|
nbt-tag,
|
||||||
|
nbt-path,
|
||||||
|
objective,
|
||||||
|
objective-criteria,
|
||||||
|
operation,
|
||||||
|
particle,
|
||||||
|
angle,
|
||||||
|
rotation,
|
||||||
|
scoreboard-slot,
|
||||||
|
score-holder(argument-type-score-holder),
|
||||||
|
swizzle,
|
||||||
|
team,
|
||||||
|
item-slot,
|
||||||
|
item-slots,
|
||||||
|
resource-location,
|
||||||
|
function,
|
||||||
|
entity-anchor,
|
||||||
|
int-range,
|
||||||
|
float-range,
|
||||||
|
dimension,
|
||||||
|
gamemode,
|
||||||
|
time(argument-type-time),
|
||||||
|
resource-or-tag(argument-type-resource-or-tag),
|
||||||
|
resource-or-tag-key(argument-type-resource-or-tag-key),
|
||||||
|
%resource(argument-type-resource),
|
||||||
|
resource-key(argument-type-resource-key),
|
||||||
|
resource-selector,
|
||||||
|
template-mirror,
|
||||||
|
template-rotation,
|
||||||
|
heightmap,
|
||||||
|
loot-table,
|
||||||
|
loot-predicate,
|
||||||
|
loot-modifier,
|
||||||
|
dialog,
|
||||||
|
uuid,
|
||||||
|
}
|
||||||
|
enum string-proto-arg-behavior {
|
||||||
|
single-word,
|
||||||
|
quotable-phrase,
|
||||||
|
greedy-phrase,
|
||||||
|
}
|
||||||
|
enum suggestion-providers {
|
||||||
|
ask-server,
|
||||||
|
all-recipes,
|
||||||
|
available-sounds,
|
||||||
|
summonable-entities,
|
||||||
|
}
|
||||||
record c-play-cookie-request {
|
record c-play-cookie-request {
|
||||||
key: string,
|
key: string,
|
||||||
}
|
}
|
||||||
@ -531,7 +818,7 @@ interface java-packets {
|
|||||||
data: list<u8>,
|
data: list<u8>,
|
||||||
}
|
}
|
||||||
record c-play-custom-report-details {
|
record c-play-custom-report-details {
|
||||||
details: list<string>,
|
details: list<tuple<string, string>>,
|
||||||
}
|
}
|
||||||
record c-damage-event {
|
record c-damage-event {
|
||||||
entity-id: s32,
|
entity-id: s32,
|
||||||
@ -546,7 +833,7 @@ interface java-packets {
|
|||||||
value: string,
|
value: string,
|
||||||
}
|
}
|
||||||
record c-debug-chunk-value {
|
record c-debug-chunk-value {
|
||||||
chunk-pos: string,
|
chunk-pos: tuple<f64, f64>,
|
||||||
name: string,
|
name: string,
|
||||||
value: string,
|
value: string,
|
||||||
}
|
}
|
||||||
@ -584,10 +871,25 @@ interface java-packets {
|
|||||||
entity-id: s32,
|
entity-id: s32,
|
||||||
animation: u8,
|
animation: u8,
|
||||||
}
|
}
|
||||||
|
enum animation {
|
||||||
|
swing-main-arm,
|
||||||
|
leave-bed,
|
||||||
|
swing-offhand,
|
||||||
|
critical-effect,
|
||||||
|
magic-criticaleffect,
|
||||||
|
}
|
||||||
record c-set-entity-metadata {
|
record c-set-entity-metadata {
|
||||||
entity-id: s32,
|
entity-id: s32,
|
||||||
metadata: list<u8>,
|
metadata: list<u8>,
|
||||||
}
|
}
|
||||||
|
record c-entity-position-sync {
|
||||||
|
entity-id: s32,
|
||||||
|
position: tuple<f64, f64, f64>,
|
||||||
|
delta: tuple<f64, f64, f64>,
|
||||||
|
yaw: f32,
|
||||||
|
pitch: f32,
|
||||||
|
on-ground: bool,
|
||||||
|
}
|
||||||
record c-entity-sound-effect {
|
record c-entity-sound-effect {
|
||||||
sound-event: string,
|
sound-event: string,
|
||||||
sound-category: s32,
|
sound-category: s32,
|
||||||
@ -617,8 +919,24 @@ interface java-packets {
|
|||||||
event: u8,
|
event: u8,
|
||||||
value: f32,
|
value: f32,
|
||||||
}
|
}
|
||||||
|
enum game-event {
|
||||||
|
no-respawn-block-available,
|
||||||
|
begin-raining,
|
||||||
|
end-raining,
|
||||||
|
change-game-mode,
|
||||||
|
win-game,
|
||||||
|
demo-event,
|
||||||
|
arrow-hit-player,
|
||||||
|
rain-level-change,
|
||||||
|
thunder-level-change,
|
||||||
|
play-pufferfish-string-sound,
|
||||||
|
play-elder-guardian-mob-appearance,
|
||||||
|
enabled-respawn-screen,
|
||||||
|
limited-crafting,
|
||||||
|
start-waiting-chunks,
|
||||||
|
}
|
||||||
record c-game-rule-values {
|
record c-game-rule-values {
|
||||||
rules: list<string>,
|
rules: list<tuple<string, string>>,
|
||||||
}
|
}
|
||||||
record c-game-test-highlight-pos {
|
record c-game-test-highlight-pos {
|
||||||
pos: tuple<s32, s32, s32>,
|
pos: tuple<s32, s32, s32>,
|
||||||
@ -660,7 +978,16 @@ interface java-packets {
|
|||||||
record c-light-update {
|
record c-light-update {
|
||||||
chunk-x: s32,
|
chunk-x: s32,
|
||||||
chunk-z: s32,
|
chunk-z: s32,
|
||||||
light-data: string,
|
light-data: light-data,
|
||||||
|
}
|
||||||
|
record light-data {
|
||||||
|
trust-edges: bool,
|
||||||
|
sky-light-mask: list<s64>,
|
||||||
|
block-light-mask: list<s64>,
|
||||||
|
empty-sky-light-mask: list<s64>,
|
||||||
|
empty-block-light-mask: list<s64>,
|
||||||
|
sky-light-arrays: list<list<u8>>,
|
||||||
|
block-light-arrays: list<list<u8>>,
|
||||||
}
|
}
|
||||||
record c-login {
|
record c-login {
|
||||||
entity-id: s32,
|
entity-id: s32,
|
||||||
@ -672,7 +999,7 @@ interface java-packets {
|
|||||||
reduced-debug-info: bool,
|
reduced-debug-info: bool,
|
||||||
enabled-respawn-screen: bool,
|
enabled-respawn-screen: bool,
|
||||||
limited-crafting: bool,
|
limited-crafting: bool,
|
||||||
spawn-data: string,
|
spawn-data: player-spawn-data,
|
||||||
online-mode: bool,
|
online-mode: bool,
|
||||||
enforce-secure-chat: bool,
|
enforce-secure-chat: bool,
|
||||||
}
|
}
|
||||||
@ -681,20 +1008,53 @@ interface java-packets {
|
|||||||
scale: u8,
|
scale: u8,
|
||||||
tracking-position: bool,
|
tracking-position: bool,
|
||||||
locked: bool,
|
locked: bool,
|
||||||
icons: option<list<string>>,
|
icons: option<list<map-icon>>,
|
||||||
data: option<string>,
|
data: option<map-patch>,
|
||||||
|
}
|
||||||
|
record map-icon {
|
||||||
|
icon-type: s32,
|
||||||
|
x: u8,
|
||||||
|
z: u8,
|
||||||
|
direction: u8,
|
||||||
|
display-name: option<string>,
|
||||||
|
}
|
||||||
|
record map-patch {
|
||||||
|
columns: u8,
|
||||||
|
rows: u8,
|
||||||
|
x: u8,
|
||||||
|
z: u8,
|
||||||
|
data: list<u8>,
|
||||||
|
}
|
||||||
|
record merchant-offer {
|
||||||
|
base-cost-a: string,
|
||||||
|
output: string,
|
||||||
|
cost-b: option<string>,
|
||||||
|
reward-exp: bool,
|
||||||
|
uses: s32,
|
||||||
|
max-uses: s32,
|
||||||
|
xp: s32,
|
||||||
|
special-price: s32,
|
||||||
|
price-multiplier: f32,
|
||||||
|
demand: s32,
|
||||||
}
|
}
|
||||||
record c-merchant-offers {
|
record c-merchant-offers {
|
||||||
window-id: s32,
|
window-id: s32,
|
||||||
offers: list<string>,
|
offers: list<merchant-offer>,
|
||||||
villager-level: s32,
|
villager-level: s32,
|
||||||
experience: s32,
|
experience: s32,
|
||||||
is-regular-villager: bool,
|
is-regular-villager: bool,
|
||||||
can-restock: bool,
|
can-restock: bool,
|
||||||
}
|
}
|
||||||
|
record minecart-step {
|
||||||
|
position: tuple<f64, f64, f64>,
|
||||||
|
movement: tuple<f64, f64, f64>,
|
||||||
|
yaw: f32,
|
||||||
|
pitch: f32,
|
||||||
|
weight: f32,
|
||||||
|
}
|
||||||
record c-move-minecart-along-track {
|
record c-move-minecart-along-track {
|
||||||
entity-id: s32,
|
entity-id: s32,
|
||||||
steps: list<string>,
|
steps: list<minecart-step>,
|
||||||
}
|
}
|
||||||
record c-move-vehicle {
|
record c-move-vehicle {
|
||||||
x: f64,
|
x: f64,
|
||||||
@ -704,8 +1064,9 @@ interface java-packets {
|
|||||||
pitch: f32,
|
pitch: f32,
|
||||||
}
|
}
|
||||||
record c-multi-block-update {
|
record c-multi-block-update {
|
||||||
chunk-section: s64,
|
chunk-section: tuple<f64, f64, f64>,
|
||||||
updates: list<s64>,
|
suppress-light-updates: bool,
|
||||||
|
updates: list<tuple<tuple<s32, s32, s32>, string>>,
|
||||||
}
|
}
|
||||||
record c-open-book {
|
record c-open-book {
|
||||||
hand: s32,
|
hand: s32,
|
||||||
@ -749,6 +1110,26 @@ interface java-packets {
|
|||||||
flying-speed: f32,
|
flying-speed: f32,
|
||||||
field-of-view: f32,
|
field-of-view: f32,
|
||||||
}
|
}
|
||||||
|
record player-action-add-player {
|
||||||
|
name: string,
|
||||||
|
properties: list<property>,
|
||||||
|
}
|
||||||
|
variant player-action {
|
||||||
|
add-player(player-action-add-player),
|
||||||
|
initialize-chat(option<init-chat>),
|
||||||
|
update-game-mode(s32),
|
||||||
|
update-listed(bool),
|
||||||
|
update-latency(s32),
|
||||||
|
update-display-name(option<string>),
|
||||||
|
update-list-order(s32),
|
||||||
|
update-hat(bool),
|
||||||
|
}
|
||||||
|
record init-chat {
|
||||||
|
session-id: uuid,
|
||||||
|
expires-at: s64,
|
||||||
|
public-key: list<u8>,
|
||||||
|
signature: list<u8>,
|
||||||
|
}
|
||||||
record c-player-chat-message {
|
record c-player-chat-message {
|
||||||
global-index: s32,
|
global-index: s32,
|
||||||
sender: uuid,
|
sender: uuid,
|
||||||
@ -757,23 +1138,36 @@ interface java-packets {
|
|||||||
message: string,
|
message: string,
|
||||||
timestamp: s64,
|
timestamp: s64,
|
||||||
salt: s64,
|
salt: s64,
|
||||||
previous-messages: list<string>,
|
previous-messages: list<previous-message>,
|
||||||
unsigned-content: option<string>,
|
unsigned-content: option<string>,
|
||||||
filter-type: string,
|
filter-type: filter-type,
|
||||||
chat-type: s32,
|
chat-type: s32,
|
||||||
sender-name: string,
|
sender-name: string,
|
||||||
target-name: option<string>,
|
target-name: option<string>,
|
||||||
}
|
}
|
||||||
|
record previous-message {
|
||||||
|
id: s32,
|
||||||
|
signature: option<list<u8>>,
|
||||||
|
}
|
||||||
|
variant filter-type {
|
||||||
|
pass-through,
|
||||||
|
fully-filtered,
|
||||||
|
partially-filtered(list<s64>),
|
||||||
|
}
|
||||||
record c-player-info-update {
|
record c-player-info-update {
|
||||||
actions: u8,
|
actions: u8,
|
||||||
players: list<string>,
|
players: list<player>,
|
||||||
|
}
|
||||||
|
record player {
|
||||||
|
uuid: uuid,
|
||||||
|
actions: list<player-action>,
|
||||||
}
|
}
|
||||||
record c-player-look-at {
|
record c-player-look-at {
|
||||||
from-anchor: s32,
|
from-anchor: s32,
|
||||||
target-x: f64,
|
target-x: f64,
|
||||||
target-y: f64,
|
target-y: f64,
|
||||||
target-z: f64,
|
target-z: f64,
|
||||||
entity: option<string>,
|
entity: option<tuple<s32, s32>>,
|
||||||
}
|
}
|
||||||
record c-player-position {
|
record c-player-position {
|
||||||
teleport-id: s32,
|
teleport-id: s32,
|
||||||
@ -790,6 +1184,17 @@ interface java-packets {
|
|||||||
yaw: f32,
|
yaw: f32,
|
||||||
pitch: f32,
|
pitch: f32,
|
||||||
}
|
}
|
||||||
|
record player-spawn-data {
|
||||||
|
dimension: string,
|
||||||
|
hashed-seed: s64,
|
||||||
|
game-mode: u8,
|
||||||
|
previous-gamemode: u8,
|
||||||
|
debug: bool,
|
||||||
|
is-flat: bool,
|
||||||
|
death-dimension-name: option<tuple<string, tuple<s32, s32, s32>>>,
|
||||||
|
portal-cooldown: s32,
|
||||||
|
sealevel: s32,
|
||||||
|
}
|
||||||
record c-player-spawn-position {
|
record c-player-spawn-position {
|
||||||
dimension-name: string,
|
dimension-name: string,
|
||||||
location: tuple<s32, s32, s32>,
|
location: tuple<s32, s32, s32>,
|
||||||
@ -833,7 +1238,7 @@ interface java-packets {
|
|||||||
objective-name: option<string>,
|
objective-name: option<string>,
|
||||||
}
|
}
|
||||||
record c-respawn {
|
record c-respawn {
|
||||||
player-spawn-info: string,
|
player-spawn-info: player-spawn-data,
|
||||||
data-kept: u8,
|
data-kept: u8,
|
||||||
}
|
}
|
||||||
record c-select-advancements-tab {
|
record c-select-advancements-tab {
|
||||||
@ -897,7 +1302,7 @@ interface java-packets {
|
|||||||
}
|
}
|
||||||
record c-set-equipment {
|
record c-set-equipment {
|
||||||
entity-id: s32,
|
entity-id: s32,
|
||||||
equipment: list<string>,
|
equipment: list<tuple<u8, string>>,
|
||||||
}
|
}
|
||||||
record c-set-experience {
|
record c-set-experience {
|
||||||
progress: f32,
|
progress: f32,
|
||||||
@ -909,6 +1314,9 @@ interface java-packets {
|
|||||||
food: s32,
|
food: s32,
|
||||||
food-saturation: f32,
|
food-saturation: f32,
|
||||||
}
|
}
|
||||||
|
record c-set-selected-slot {
|
||||||
|
slot: u8,
|
||||||
|
}
|
||||||
record c-set-passengers {
|
record c-set-passengers {
|
||||||
entity-id: s32,
|
entity-id: s32,
|
||||||
passengers: list<s32>,
|
passengers: list<s32>,
|
||||||
@ -917,10 +1325,26 @@ interface java-packets {
|
|||||||
slot: s32,
|
slot: s32,
|
||||||
item: string,
|
item: string,
|
||||||
}
|
}
|
||||||
|
enum team-method {
|
||||||
|
create,
|
||||||
|
remove,
|
||||||
|
update,
|
||||||
|
add-players,
|
||||||
|
remove-players,
|
||||||
|
}
|
||||||
|
record team-parameters {
|
||||||
|
display-name: string,
|
||||||
|
options: u8,
|
||||||
|
nametag-visibility: string,
|
||||||
|
collision-rule: string,
|
||||||
|
color: s32,
|
||||||
|
player-prefix: string,
|
||||||
|
player-suffix: string,
|
||||||
|
}
|
||||||
record c-set-player-team {
|
record c-set-player-team {
|
||||||
team-name: string,
|
team-name: string,
|
||||||
method: string,
|
method: team-method,
|
||||||
parameters: option<string>,
|
parameters: option<team-parameters>,
|
||||||
players: list<string>,
|
players: list<string>,
|
||||||
}
|
}
|
||||||
record c-set-simulation-distance {
|
record c-set-simulation-distance {
|
||||||
@ -928,7 +1352,7 @@ interface java-packets {
|
|||||||
}
|
}
|
||||||
record c-update-time {
|
record c-update-time {
|
||||||
game-time: s64,
|
game-time: s64,
|
||||||
clock-updates: list<string>,
|
clock-updates: list<tuple<s32, s64, f32, f32>>,
|
||||||
}
|
}
|
||||||
record c-title-text {
|
record c-title-text {
|
||||||
title: string,
|
title: string,
|
||||||
@ -990,6 +1414,10 @@ interface java-packets {
|
|||||||
record c-subtitle {
|
record c-subtitle {
|
||||||
subtitle: string,
|
subtitle: string,
|
||||||
}
|
}
|
||||||
|
record c-system-chat-message {
|
||||||
|
content: string,
|
||||||
|
overlay: bool,
|
||||||
|
}
|
||||||
record c-tab-list {
|
record c-tab-list {
|
||||||
header: string,
|
header: string,
|
||||||
footer: string,
|
footer: string,
|
||||||
@ -1041,7 +1469,17 @@ interface java-packets {
|
|||||||
}
|
}
|
||||||
record c-update-attributes {
|
record c-update-attributes {
|
||||||
entity-id: s32,
|
entity-id: s32,
|
||||||
properties: list<string>,
|
properties: list<property>,
|
||||||
|
}
|
||||||
|
record property {
|
||||||
|
id: s32,
|
||||||
|
value: f64,
|
||||||
|
modifiers: list<attribute-modifier>,
|
||||||
|
}
|
||||||
|
record attribute-modifier {
|
||||||
|
id: string,
|
||||||
|
amount: f64,
|
||||||
|
operation: u8,
|
||||||
}
|
}
|
||||||
record c-update-entity-pos {
|
record c-update-entity-pos {
|
||||||
entity-id: s32,
|
entity-id: s32,
|
||||||
@ -1075,6 +1513,15 @@ interface java-packets {
|
|||||||
render-type: s32,
|
render-type: s32,
|
||||||
number-format: option<string>,
|
number-format: option<string>,
|
||||||
}
|
}
|
||||||
|
enum mode {
|
||||||
|
add,
|
||||||
|
remove,
|
||||||
|
update,
|
||||||
|
}
|
||||||
|
enum render-type {
|
||||||
|
integer,
|
||||||
|
hearts,
|
||||||
|
}
|
||||||
record c-update-recipes {
|
record c-update-recipes {
|
||||||
raw-data: list<u8>,
|
raw-data: list<u8>,
|
||||||
}
|
}
|
||||||
@ -1085,13 +1532,40 @@ interface java-packets {
|
|||||||
display-name: option<string>,
|
display-name: option<string>,
|
||||||
number-format: option<string>,
|
number-format: option<string>,
|
||||||
}
|
}
|
||||||
|
record c-update-tags-play {
|
||||||
|
tags: list<string>,
|
||||||
|
}
|
||||||
record c-use-bed {
|
record c-use-bed {
|
||||||
entity-id: s32,
|
entity-id: s32,
|
||||||
location: tuple<s32, s32, s32>,
|
location: tuple<s32, s32, s32>,
|
||||||
}
|
}
|
||||||
|
enum waypoint-operation {
|
||||||
|
track,
|
||||||
|
untrack,
|
||||||
|
update,
|
||||||
|
}
|
||||||
|
record waypoint-target-chunk {
|
||||||
|
x: s32,
|
||||||
|
z: s32,
|
||||||
|
}
|
||||||
|
variant waypoint-target {
|
||||||
|
position(tuple<s32, s32, s32>),
|
||||||
|
chunk(waypoint-target-chunk),
|
||||||
|
azimuth(f32),
|
||||||
|
empty,
|
||||||
|
}
|
||||||
|
record waypoint-icon {
|
||||||
|
style: option<string>,
|
||||||
|
color: s32,
|
||||||
|
}
|
||||||
|
record tracked-waypoint {
|
||||||
|
identifier: uuid,
|
||||||
|
icon: option<waypoint-icon>,
|
||||||
|
target: waypoint-target,
|
||||||
|
}
|
||||||
record c-waypoint {
|
record c-waypoint {
|
||||||
operation: string,
|
operation: waypoint-operation,
|
||||||
waypoint: string,
|
waypoint: tracked-waypoint,
|
||||||
}
|
}
|
||||||
record c-world-event {
|
record c-world-event {
|
||||||
event: s32,
|
event: s32,
|
||||||
|
|||||||
129
v0.1/player.wit
129
v0.1/player.wit
@ -1,6 +1,6 @@
|
|||||||
/// Represents a player connected to the Minecraft server.
|
/// Represents a player connected to the Minecraft server.
|
||||||
interface player {
|
interface player {
|
||||||
use common.{hand, position, game-mode};
|
use common.{hand, position, game-mode, block-pos};
|
||||||
use item-stack.{item-stack};
|
use item-stack.{item-stack};
|
||||||
use %world.{%world, entity, ray-trace-block-result, ray-trace-entity-result};
|
use %world.{%world, entity, ray-trace-block-result, ray-trace-entity-result};
|
||||||
use permission.{permission-level};
|
use permission.{permission-level};
|
||||||
@ -17,6 +17,9 @@ interface player {
|
|||||||
use damage-types.{damage-type};
|
use damage-types.{damage-type};
|
||||||
use statistics.{statistic-category, custom-statistic};
|
use statistics.{statistic-category, custom-statistic};
|
||||||
use inventory.{inventory, player-inventory};
|
use inventory.{inventory, player-inventory};
|
||||||
|
use sounds.{sound, sound-category};
|
||||||
|
use particles.{particle};
|
||||||
|
use entity-statuses.{entity-status};
|
||||||
|
|
||||||
/// Represents per-player weather condition overrides.
|
/// Represents per-player weather condition overrides.
|
||||||
enum player-weather {
|
enum player-weather {
|
||||||
@ -37,6 +40,50 @@ interface player {
|
|||||||
wind-charge,
|
wind-charge,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Types of clientbound game events.
|
||||||
|
enum client-game-event {
|
||||||
|
no-respawn-block-available,
|
||||||
|
begin-raining,
|
||||||
|
end-raining,
|
||||||
|
change-game-mode,
|
||||||
|
win-game,
|
||||||
|
demo-event,
|
||||||
|
arrow-hit-player,
|
||||||
|
rain-level-change,
|
||||||
|
thunder-level-change,
|
||||||
|
play-pufferfish-string-sound,
|
||||||
|
play-elder-guardian-mob-appearance,
|
||||||
|
enabled-respawn-screen,
|
||||||
|
limited-crafting,
|
||||||
|
start-waiting-chunks,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Built-in known server link types displayed in the client Escape pause menu.
|
||||||
|
enum known-server-link {
|
||||||
|
bug-report,
|
||||||
|
community-guidelines,
|
||||||
|
support,
|
||||||
|
status,
|
||||||
|
feedback,
|
||||||
|
community,
|
||||||
|
website,
|
||||||
|
forums,
|
||||||
|
news,
|
||||||
|
announcements,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Label for a server link: either a built-in standard link type or a custom text component.
|
||||||
|
variant server-link-label {
|
||||||
|
known(known-server-link),
|
||||||
|
custom(text-component),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Represents a server link entry with a label and destination URL.
|
||||||
|
record server-link {
|
||||||
|
label: server-link-label,
|
||||||
|
url: string,
|
||||||
|
}
|
||||||
|
|
||||||
/// Various abilities a player can have.
|
/// Various abilities a player can have.
|
||||||
record player-abilities {
|
record player-abilities {
|
||||||
/// Whether the player is invulnerable to damage.
|
/// Whether the player is invulnerable to damage.
|
||||||
@ -840,6 +887,10 @@ interface player {
|
|||||||
|
|
||||||
/// Sends a system message to the player's chat.
|
/// Sends a system message to the player's chat.
|
||||||
send-system-message: func (text: text-component, overlay: bool);
|
send-system-message: func (text: text-component, overlay: bool);
|
||||||
|
/// Deletes a signed chat message from the player's chat window using its 256-byte signature.
|
||||||
|
delete-message-by-signature: func (signature: list<u8>);
|
||||||
|
/// Deletes a signed chat message from the player's chat window using its signature cache ID.
|
||||||
|
delete-message-by-id: func (signature-id: s32);
|
||||||
/// Sets the header and footer of the player's Tab list.
|
/// Sets the header and footer of the player's Tab list.
|
||||||
set-tab-list-header-footer: func (header: text-component, footer: text-component);
|
set-tab-list-header-footer: func (header: text-component, footer: text-component);
|
||||||
|
|
||||||
@ -860,6 +911,76 @@ interface player {
|
|||||||
/// Sets the fade-in, stay, and fade-out times for titles.
|
/// Sets the fade-in, stay, and fade-out times for titles.
|
||||||
send-title-animation: func (fade-in: s32, stay: s32, fade-out: s32);
|
send-title-animation: func (fade-in: s32, stay: s32, fade-out: s32);
|
||||||
|
|
||||||
|
// Camera & Spectating
|
||||||
|
|
||||||
|
/// Sets the player's camera to view from the perspective of another entity.
|
||||||
|
/// If `entity` is `none`, the camera is reset back to the player.
|
||||||
|
set-camera: func (entity: option<entity>);
|
||||||
|
/// Sets the player's camera to view from the perspective of an entity with the given entity ID.
|
||||||
|
/// If `entity-id` is the player's own entity ID, the camera is reset back to the player.
|
||||||
|
set-camera-entity-id: func (entity-id: u32);
|
||||||
|
/// Gets the entity ID of the entity that the player's camera is currently attached to,
|
||||||
|
/// or the player's own entity ID if the camera has not been overridden.
|
||||||
|
get-camera-entity-id: func () -> u32;
|
||||||
|
/// Resets the player's camera back to their own perspective.
|
||||||
|
reset-camera: func ();
|
||||||
|
|
||||||
|
// Audio & Particles
|
||||||
|
|
||||||
|
/// Plays a sound effect for this player at their current location.
|
||||||
|
play-sound: func(sound: sound, category: sound-category, volume: f32, pitch: f32);
|
||||||
|
/// Plays a sound effect for this player at a specific location.
|
||||||
|
play-sound-at: func(pos: position, sound: sound, category: sound-category, volume: f32, pitch: f32);
|
||||||
|
/// Stops a sound effect from playing for this player.
|
||||||
|
stop-sound: func(sound: option<sound>, category: option<sound-category>);
|
||||||
|
|
||||||
|
/// Plays a custom resource pack sound identifier for this player at their current location.
|
||||||
|
play-custom-sound: func(sound-name: string, category: sound-category, volume: f32, pitch: f32);
|
||||||
|
/// Plays a custom resource pack sound identifier for this player at a specific location.
|
||||||
|
play-custom-sound-at: func(pos: position, sound-name: string, category: sound-category, volume: f32, pitch: f32);
|
||||||
|
/// Stops a custom sound identifier from playing for this player.
|
||||||
|
stop-custom-sound: func(sound-name: option<string>, category: option<sound-category>);
|
||||||
|
|
||||||
|
/// Spawns particles visible only to this player.
|
||||||
|
spawn-particles: func(particle: particle, pos: position, count: u32, offset: position, max-speed: f32);
|
||||||
|
|
||||||
|
// Visuals & Client Overrides
|
||||||
|
|
||||||
|
/// Sends a temporary fake block change to the player's client without modifying the server world.
|
||||||
|
send-block-change: func(pos: block-pos, block-id: u16);
|
||||||
|
/// Resets a temporary fake block change by resending the actual world block at that position.
|
||||||
|
reset-block-change: func(pos: block-pos);
|
||||||
|
|
||||||
|
/// Sends a hurt / damage-tilt animation to the player's client (causes screen shake in the given yaw direction).
|
||||||
|
send-hurt-animation: func(yaw: f32);
|
||||||
|
|
||||||
|
/// Opens a written book interface for the player from the specified hand.
|
||||||
|
open-book: func(hand: hand);
|
||||||
|
/// Forces the sign text editor to open for the player at the specified sign block position.
|
||||||
|
open-sign-editor: func(pos: block-pos, is-front-text: bool);
|
||||||
|
|
||||||
|
// Velocity & Physics
|
||||||
|
|
||||||
|
/// Sets the player's velocity / motion vector.
|
||||||
|
set-velocity: func(velocity: position);
|
||||||
|
/// Applies directional knockback impulse to the player.
|
||||||
|
apply-knockback: func(strength: f64, x: f64, z: f64);
|
||||||
|
|
||||||
|
// Movement Lock & Freezing
|
||||||
|
|
||||||
|
/// Sets whether the player's movement is locked (frozen in place) for cutscenes and NPC dialogues.
|
||||||
|
set-movement-locked: func(locked: bool);
|
||||||
|
/// Returns whether the player's movement is currently locked.
|
||||||
|
is-movement-locked: func() -> bool;
|
||||||
|
|
||||||
|
/// Sets the number of freeze ticks on the player (controlling the powdered snow / frostbite screen vignette).
|
||||||
|
set-freeze-ticks: func(ticks: s32);
|
||||||
|
/// Returns the current number of freeze ticks on the player.
|
||||||
|
get-freeze-ticks: func() -> s32;
|
||||||
|
|
||||||
|
/// Sends custom server links to the player (displayed in the client Esc pause menu in 1.21+).
|
||||||
|
set-server-links: func(links: list<server-link>);
|
||||||
|
|
||||||
// Teleport & kick
|
// Teleport & kick
|
||||||
|
|
||||||
/// Teleports the player to a position in a world.
|
/// Teleports the player to a position in a world.
|
||||||
@ -1254,6 +1375,12 @@ interface player {
|
|||||||
|
|
||||||
/// Kicks the Java player with the specified options.
|
/// Kicks the Java player with the specified options.
|
||||||
kick: func(options: java-kick-options);
|
kick: func(options: java-kick-options);
|
||||||
|
|
||||||
|
/// Sends a clientbound GameEvent packet to the Java player.
|
||||||
|
send-game-event: func(event: client-game-event, value: f32);
|
||||||
|
|
||||||
|
/// Sends an entity status / animation event packet to the Java player for a specific entity ID.
|
||||||
|
send-entity-status: func(entity-id: s32, status: entity-status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A handle to a player connected via the Bedrock Edition.
|
/// A handle to a player connected via the Bedrock Edition.
|
||||||
|
|||||||
@ -71,6 +71,12 @@ world plugin {
|
|||||||
import display;
|
import display;
|
||||||
/// Provides game rules definitions and queries.
|
/// Provides game rules definitions and queries.
|
||||||
import game-rules;
|
import game-rules;
|
||||||
|
/// Provides game event types.
|
||||||
|
import game-events;
|
||||||
|
/// Provides potion types.
|
||||||
|
import potions;
|
||||||
|
/// Provides entity status / animation event types.
|
||||||
|
import entity-statuses;
|
||||||
|
|
||||||
// --- Plugin-provided exports ---
|
// --- Plugin-provided exports ---
|
||||||
|
|
||||||
|
|||||||
52
v0.1/potions.wit
Normal file
52
v0.1/potions.wit
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
package pumpkin:plugin@0.1.0;
|
||||||
|
|
||||||
|
interface potions {
|
||||||
|
enum potion-type {
|
||||||
|
water,
|
||||||
|
mundane,
|
||||||
|
thick,
|
||||||
|
awkward,
|
||||||
|
night-vision,
|
||||||
|
long-night-vision,
|
||||||
|
invisibility,
|
||||||
|
long-invisibility,
|
||||||
|
leaping,
|
||||||
|
long-leaping,
|
||||||
|
strong-leaping,
|
||||||
|
fire-resistance,
|
||||||
|
long-fire-resistance,
|
||||||
|
swiftness,
|
||||||
|
long-swiftness,
|
||||||
|
strong-swiftness,
|
||||||
|
slowness,
|
||||||
|
long-slowness,
|
||||||
|
strong-slowness,
|
||||||
|
turtle-master,
|
||||||
|
long-turtle-master,
|
||||||
|
strong-turtle-master,
|
||||||
|
water-breathing,
|
||||||
|
long-water-breathing,
|
||||||
|
healing,
|
||||||
|
strong-healing,
|
||||||
|
harming,
|
||||||
|
strong-harming,
|
||||||
|
poison,
|
||||||
|
long-poison,
|
||||||
|
strong-poison,
|
||||||
|
regeneration,
|
||||||
|
long-regeneration,
|
||||||
|
strong-regeneration,
|
||||||
|
strength,
|
||||||
|
long-strength,
|
||||||
|
strong-strength,
|
||||||
|
weakness,
|
||||||
|
long-weakness,
|
||||||
|
luck,
|
||||||
|
slow-falling,
|
||||||
|
long-slow-falling,
|
||||||
|
wind-charged,
|
||||||
|
weaving,
|
||||||
|
oozing,
|
||||||
|
infested,
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
interface server {
|
interface server {
|
||||||
use player.{player, ban-player-options, ban-ip-options};
|
use player.{player, ban-player-options, ban-ip-options, server-link, known-server-link, server-link-label};
|
||||||
use common.{game-mode};
|
use common.{game-mode};
|
||||||
use %world.{%world};
|
use %world.{%world};
|
||||||
use text.{text-component};
|
use text.{text-component};
|
||||||
@ -211,6 +211,12 @@ interface server {
|
|||||||
/// Broadcasts a system chat message to all players.
|
/// Broadcasts a system chat message to all players.
|
||||||
broadcast: func(message: string);
|
broadcast: func(message: string);
|
||||||
|
|
||||||
|
/// Deletes a signed chat message from all players' chat windows using its 256-byte signature.
|
||||||
|
delete-message-by-signature: func(signature: list<u8>);
|
||||||
|
|
||||||
|
/// Deletes a signed chat message from all players' chat windows using its signature cache ID.
|
||||||
|
delete-message-by-id: func(signature-id: s32);
|
||||||
|
|
||||||
/// Broadcasts a tab list header and footer to all players.
|
/// Broadcasts a tab list header and footer to all players.
|
||||||
broadcast-tab-list-header-footer: func(header: text-component, footer: text-component);
|
broadcast-tab-list-header-footer: func(header: text-component, footer: text-component);
|
||||||
|
|
||||||
@ -273,5 +279,8 @@ interface server {
|
|||||||
|
|
||||||
/// Returns the global datapack manager for inspecting, enabling, disabling, and reloading datapacks.
|
/// Returns the global datapack manager for inspecting, enabling, disabling, and reloading datapacks.
|
||||||
get-datapack-manager: func() -> datapack-manager;
|
get-datapack-manager: func() -> datapack-manager;
|
||||||
|
|
||||||
|
/// Broadcasts custom server links to all connected players (displayed in the client Esc pause menu in 1.21+).
|
||||||
|
set-server-links: func(links: list<server-link>);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,19 @@
|
|||||||
package pumpkin:plugin@0.1.0;
|
package pumpkin:plugin@0.1.0;
|
||||||
|
|
||||||
interface sounds {
|
interface sounds {
|
||||||
|
enum sound-category {
|
||||||
|
master,
|
||||||
|
music,
|
||||||
|
records,
|
||||||
|
weather,
|
||||||
|
blocks,
|
||||||
|
hostile,
|
||||||
|
neutral,
|
||||||
|
players,
|
||||||
|
ambient,
|
||||||
|
voice,
|
||||||
|
ui,
|
||||||
|
}
|
||||||
enum sound {
|
enum sound {
|
||||||
entity-allay-ambient-with-item,
|
entity-allay-ambient-with-item,
|
||||||
entity-allay-ambient-without-item,
|
entity-allay-ambient-without-item,
|
||||||
|
|||||||
@ -4,7 +4,7 @@ interface %world {
|
|||||||
use text.{text-component};
|
use text.{text-component};
|
||||||
use scoreboard.{scoreboard};
|
use scoreboard.{scoreboard};
|
||||||
use particles.{particle};
|
use particles.{particle};
|
||||||
use sounds.{sound};
|
use sounds.{sound, sound-category};
|
||||||
use entity-types.{entity-type};
|
use entity-types.{entity-type};
|
||||||
use biomes.{biome};
|
use biomes.{biome};
|
||||||
use attributes.{attribute, modifier-operation, attribute-modifier};
|
use attributes.{attribute, modifier-operation, attribute-modifier};
|
||||||
@ -224,20 +224,6 @@ interface %world {
|
|||||||
generic,
|
generic,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Categories for sounds to control their volume independently.
|
|
||||||
enum sound-category {
|
|
||||||
master,
|
|
||||||
music,
|
|
||||||
records,
|
|
||||||
weather,
|
|
||||||
blocks,
|
|
||||||
hostile,
|
|
||||||
neutral,
|
|
||||||
players,
|
|
||||||
ambient,
|
|
||||||
voice,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Defines how an explosion interacts with blocks in the world.
|
/// Defines how an explosion interacts with blocks in the world.
|
||||||
enum explosion-interaction {
|
enum explosion-interaction {
|
||||||
/// No interaction with blocks.
|
/// No interaction with blocks.
|
||||||
@ -618,6 +604,11 @@ interface %world {
|
|||||||
/// Sets the specialized mob-specific data for this mob.
|
/// Sets the specialized mob-specific data for this mob.
|
||||||
/// Returns false if the provided data variant is incompatible with this mob.
|
/// Returns false if the provided data variant is incompatible with this mob.
|
||||||
set-mob-data: func(data: mob-data) -> bool;
|
set-mob-data: func(data: mob-data) -> bool;
|
||||||
|
|
||||||
|
/// Sets the number of freeze ticks on this entity (0 to 140).
|
||||||
|
set-freeze-ticks: func(ticks: s32);
|
||||||
|
/// Returns the number of freeze ticks currently on this entity.
|
||||||
|
get-freeze-ticks: func() -> s32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Result of a raycast operation.
|
/// Result of a raycast operation.
|
||||||
@ -876,6 +867,9 @@ interface %world {
|
|||||||
/// Plays a sound at the specified position for all players in the world.
|
/// Plays a sound at the specified position for all players in the world.
|
||||||
play-sound: func(sound: sound, category: sound-category, pos: position, volume: f32, pitch: f32);
|
play-sound: func(sound: sound, category: sound-category, pos: position, volume: f32, pitch: f32);
|
||||||
|
|
||||||
|
/// Plays a custom resource pack sound identifier at the specified position for all players in the world.
|
||||||
|
play-custom-sound: func(sound-name: string, category: sound-category, pos: position, volume: f32, pitch: f32);
|
||||||
|
|
||||||
/// Spawns particles at the specified position.
|
/// Spawns particles at the specified position.
|
||||||
spawn-particle: func(particle: particle, pos: position, offset: position, max-speed: f32, count: s32);
|
spawn-particle: func(particle: particle, pos: position, offset: position, max-speed: f32, count: s32);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user