pumpkin-api-py 0.1.0.dev2__py3-none-any.whl → 0.1.0.dev3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pumpkin_api/wit/common.wit +14 -0
- pumpkin_api/wit/event.wit +22 -1
- pumpkin_api/wit/gui.wit +13 -1
- pumpkin_api/wit/player.wit +33 -10
- pumpkin_api/wit/server.wit +18 -0
- pumpkin_api/wit/world.wit +38 -0
- {pumpkin_api_py-0.1.0.dev2.dist-info → pumpkin_api_py-0.1.0.dev3.dist-info}/METADATA +1 -1
- {pumpkin_api_py-0.1.0.dev2.dist-info → pumpkin_api_py-0.1.0.dev3.dist-info}/RECORD +17 -17
- wit_world/imports/common.py +15 -0
- wit_world/imports/event.py +39 -10
- wit_world/imports/gui.py +20 -0
- wit_world/imports/player.py +50 -25
- wit_world/imports/server.py +30 -0
- wit_world/imports/world.py +44 -0
- {pumpkin_api_py-0.1.0.dev2.dist-info → pumpkin_api_py-0.1.0.dev3.dist-info}/WHEEL +0 -0
- {pumpkin_api_py-0.1.0.dev2.dist-info → pumpkin_api_py-0.1.0.dev3.dist-info}/entry_points.txt +0 -0
- {pumpkin_api_py-0.1.0.dev2.dist-info → pumpkin_api_py-0.1.0.dev3.dist-info}/licenses/LICENSE +0 -0
pumpkin_api/wit/common.wit
CHANGED
|
@@ -67,6 +67,20 @@ interface common {
|
|
|
67
67
|
count: u8,
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
/// Represents the type of click interaction in a GUI.
|
|
71
|
+
enum click-type {
|
|
72
|
+
left,
|
|
73
|
+
right,
|
|
74
|
+
shift-left,
|
|
75
|
+
shift-right,
|
|
76
|
+
middle,
|
|
77
|
+
drop,
|
|
78
|
+
control-drop,
|
|
79
|
+
double-click,
|
|
80
|
+
number-key,
|
|
81
|
+
unknown,
|
|
82
|
+
}
|
|
83
|
+
|
|
70
84
|
/// Represents the various poses an entity can be in.
|
|
71
85
|
enum entity-pose {
|
|
72
86
|
standing,
|
pumpkin_api/wit/event.wit
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface event {
|
|
2
|
-
use common.{block-position, game-mode, hand, item-stack, position};
|
|
2
|
+
use common.{block-position, game-mode, hand, item-stack, position, click-type};
|
|
3
3
|
use player.{player};
|
|
4
4
|
use text.{text-component};
|
|
5
5
|
use %world.{%world};
|
|
@@ -179,6 +179,23 @@ interface event {
|
|
|
179
179
|
cancelled: bool
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
record inventory-click-event-data {
|
|
183
|
+
player: player,
|
|
184
|
+
window-type: option<string>,
|
|
185
|
+
click-type: click-type,
|
|
186
|
+
slot: s16,
|
|
187
|
+
raw-slot: s16,
|
|
188
|
+
clicked-item: option<item-stack>,
|
|
189
|
+
cursor: option<item-stack>,
|
|
190
|
+
hotbar-button: s32,
|
|
191
|
+
cancelled: bool
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
record inventory-close-event-data {
|
|
195
|
+
player: player,
|
|
196
|
+
window-type: option<string>
|
|
197
|
+
}
|
|
198
|
+
|
|
182
199
|
record block-redstone-event-data {
|
|
183
200
|
target-world: %world,
|
|
184
201
|
state-id: u16,
|
|
@@ -272,6 +289,8 @@ interface event {
|
|
|
272
289
|
player-toggle-sneak-event,
|
|
273
290
|
player-toggle-flight-event,
|
|
274
291
|
player-toggle-sprint-event,
|
|
292
|
+
inventory-click-event,
|
|
293
|
+
inventory-close-event,
|
|
275
294
|
block-redstone-event,
|
|
276
295
|
block-break-event,
|
|
277
296
|
block-burn-event,
|
|
@@ -305,6 +324,8 @@ interface event {
|
|
|
305
324
|
player-toggle-sneak-event(player-toggle-sneak-event-data),
|
|
306
325
|
player-toggle-flight-event(player-toggle-flight-event-data),
|
|
307
326
|
player-toggle-sprint-event(player-toggle-sprint-event-data),
|
|
327
|
+
inventory-click-event(inventory-click-event-data),
|
|
328
|
+
inventory-close-event(inventory-close-event-data),
|
|
308
329
|
block-redstone-event(block-redstone-event-data),
|
|
309
330
|
block-break-event(block-break-event-data),
|
|
310
331
|
block-burn-event(block-burn-event-data),
|
pumpkin_api/wit/gui.wit
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface gui {
|
|
2
2
|
use text.{text-component};
|
|
3
|
-
use common.{item-stack};
|
|
3
|
+
use common.{item-stack, click-type};
|
|
4
4
|
|
|
5
5
|
enum gui-type {
|
|
6
6
|
generic-9x1,
|
|
@@ -46,5 +46,17 @@ interface gui {
|
|
|
46
46
|
|
|
47
47
|
/// Clears all items from the GUI.
|
|
48
48
|
clear-items: func();
|
|
49
|
+
|
|
50
|
+
/// Sets whether players can grab items out of the inventory.
|
|
51
|
+
set-allow-grab-items: func(allow: bool);
|
|
52
|
+
|
|
53
|
+
/// Returns whether players can grab items out of the inventory.
|
|
54
|
+
get-allow-grab-items: func() -> bool;
|
|
55
|
+
|
|
56
|
+
/// Sets whether players can put items into the inventory from their own.
|
|
57
|
+
set-allow-put-items: func(allow: bool);
|
|
58
|
+
|
|
59
|
+
/// Returns whether players can put items into the inventory from their own.
|
|
60
|
+
get-allow-put-items: func() -> bool;
|
|
49
61
|
}
|
|
50
62
|
}
|
pumpkin_api/wit/player.wit
CHANGED
|
@@ -25,6 +25,25 @@ interface player {
|
|
|
25
25
|
walk-speed: f32,
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/// Represents a player's skin textures and metadata.
|
|
29
|
+
record player-skin {
|
|
30
|
+
/// The base64-encoded texture data (usually JSON containing skin/cape URLs).
|
|
31
|
+
value: string,
|
|
32
|
+
/// The optional signature for the texture data.
|
|
33
|
+
signature: option<string>,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/// Flags representing visible skin parts.
|
|
37
|
+
flags skin-parts {
|
|
38
|
+
cape,
|
|
39
|
+
jacket,
|
|
40
|
+
left-sleeve,
|
|
41
|
+
right-sleeve,
|
|
42
|
+
left-pants-leg,
|
|
43
|
+
right-pants-leg,
|
|
44
|
+
hat,
|
|
45
|
+
}
|
|
46
|
+
|
|
28
47
|
/// A handle to a player on the server.
|
|
29
48
|
resource player {
|
|
30
49
|
/// Returns the player as an entity.
|
|
@@ -59,6 +78,12 @@ interface player {
|
|
|
59
78
|
get-permission-level: func () -> permission-level;
|
|
60
79
|
/// Sets the player's permission level.
|
|
61
80
|
set-permission-level: func (level: permission-level);
|
|
81
|
+
/// Grants or denies a specific permission node for the player.
|
|
82
|
+
set-permission: func(node: string, value: bool);
|
|
83
|
+
/// Removes an explicitly set permission node from the player.
|
|
84
|
+
unset-permission: func(node: string);
|
|
85
|
+
/// Returns `Some(true)` if granted, `Some(false)` if denied, or `None` if not set.
|
|
86
|
+
has-permission-set: func (node: string) -> option<bool>;
|
|
62
87
|
/// Checks if the player has a specific permission node.
|
|
63
88
|
has-permission: func (node: string) -> bool;
|
|
64
89
|
/// Returns the player's display name, which may include formatting.
|
|
@@ -162,16 +187,6 @@ interface player {
|
|
|
162
187
|
/// Adds experience points to the player.
|
|
163
188
|
add-experience-points: func(points: s32);
|
|
164
189
|
|
|
165
|
-
/// Returns whether the player is currently sneaking.
|
|
166
|
-
is-sneaking: func() -> bool;
|
|
167
|
-
/// Sets whether the player is currently sneaking.
|
|
168
|
-
set-sneaking: func(sneaking: bool);
|
|
169
|
-
/// Returns whether the player is currently sprinting.
|
|
170
|
-
is-sprinting: func() -> bool;
|
|
171
|
-
/// Sets whether the player is currently sprinting.
|
|
172
|
-
set-sprinting: func(sprinting: bool);
|
|
173
|
-
/// Returns whether the player is currently on the ground.
|
|
174
|
-
is-on-ground: func() -> bool;
|
|
175
190
|
/// Returns whether the player is currently flying.
|
|
176
191
|
is-flying: func() -> bool;
|
|
177
192
|
/// Sets whether the player should be flying.
|
|
@@ -184,5 +199,13 @@ interface player {
|
|
|
184
199
|
|
|
185
200
|
/// Returns the player's IP address.
|
|
186
201
|
get-ip: func() -> string;
|
|
202
|
+
|
|
203
|
+
/// Returns the player's current skin textures.
|
|
204
|
+
get-skin: func() -> option<player-skin>;
|
|
205
|
+
|
|
206
|
+
/// Returns the currently visible skin parts.
|
|
207
|
+
get-skin-parts: func() -> skin-parts;
|
|
208
|
+
/// Sets which skin parts are visible.
|
|
209
|
+
set-skin-parts: func(parts: skin-parts);
|
|
187
210
|
}
|
|
188
211
|
}
|
pumpkin_api/wit/server.wit
CHANGED
|
@@ -16,6 +16,18 @@ interface server {
|
|
|
16
16
|
hard,
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/// Represents the three main Minecraft dimensions.
|
|
20
|
+
enum dimension {
|
|
21
|
+
overworld,
|
|
22
|
+
nether,
|
|
23
|
+
end,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
variant command-sender {
|
|
27
|
+
console,
|
|
28
|
+
player(player),
|
|
29
|
+
}
|
|
30
|
+
|
|
19
31
|
/// Represents the global server instance.
|
|
20
32
|
resource server {
|
|
21
33
|
/// Returns the current difficulty level of the server.
|
|
@@ -47,6 +59,12 @@ interface server {
|
|
|
47
59
|
/// Gets a world by its dimension name (e.g., "minecraft:overworld").
|
|
48
60
|
get-world-by-name: func(name: string) -> option<%world>;
|
|
49
61
|
|
|
62
|
+
execute-command: func(command: string, sender: command-sender);
|
|
63
|
+
|
|
64
|
+
/// Creates or loads a world by its name and dimension.
|
|
65
|
+
/// If a world with the given name already exists, it will be returned.
|
|
66
|
+
create-world: func(name: string, dimension: dimension) -> %world;
|
|
67
|
+
|
|
50
68
|
/// Broadcasts a system chat message to all players.
|
|
51
69
|
broadcast: func(message: string);
|
|
52
70
|
|
pumpkin_api/wit/world.wit
CHANGED
|
@@ -114,10 +114,27 @@ interface %world {
|
|
|
114
114
|
get-head-yaw: func() -> f32;
|
|
115
115
|
|
|
116
116
|
is-on-ground: func() -> bool;
|
|
117
|
+
|
|
117
118
|
is-sneaking: func() -> bool;
|
|
119
|
+
set-sneaking: func(sneaking: bool);
|
|
120
|
+
|
|
118
121
|
is-sprinting: func() -> bool;
|
|
122
|
+
set-sprinting: func(sprinting: bool);
|
|
123
|
+
|
|
124
|
+
is-swimming: func() -> bool;
|
|
125
|
+
set-swimming: func(swimming: bool);
|
|
126
|
+
|
|
119
127
|
is-invisible: func() -> bool;
|
|
128
|
+
set-invisible: func(invisible: bool);
|
|
129
|
+
|
|
120
130
|
is-glowing: func() -> bool;
|
|
131
|
+
set-glowing: func(glowing: bool);
|
|
132
|
+
|
|
133
|
+
is-fall-flying: func() -> bool;
|
|
134
|
+
set-fall-flying: func(fall-flying: bool);
|
|
135
|
+
|
|
136
|
+
is-on-fire: func() -> bool;
|
|
137
|
+
set-on-fire: func(on-fire: bool);
|
|
121
138
|
|
|
122
139
|
teleport: func(pos: position, world-ref: %world);
|
|
123
140
|
set-velocity: func(velocity: position);
|
|
@@ -137,6 +154,27 @@ interface %world {
|
|
|
137
154
|
set-fire-ticks: func(ticks: s32);
|
|
138
155
|
|
|
139
156
|
remove: func();
|
|
157
|
+
|
|
158
|
+
/// Performs a raycast from the entity's eye position in its looking direction.
|
|
159
|
+
raycast: func(max-distance: f64, fluid-handling: bool) -> option<raycast-result>;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/// Result of a raycast operation.
|
|
163
|
+
record raycast-result {
|
|
164
|
+
/// The block position that was hit.
|
|
165
|
+
pos: block-pos,
|
|
166
|
+
/// The face of the block that was hit.
|
|
167
|
+
face: block-direction,
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/// Represents a cardinal direction or block face.
|
|
171
|
+
enum block-direction {
|
|
172
|
+
down,
|
|
173
|
+
up,
|
|
174
|
+
north,
|
|
175
|
+
south,
|
|
176
|
+
west,
|
|
177
|
+
east,
|
|
140
178
|
}
|
|
141
179
|
|
|
142
180
|
/// Represents a Minecraft world (dimension).
|
|
@@ -4,22 +4,22 @@ pumpkin_api/impl.py,sha256=aSNUbwT85Pj3kQ_VkC0z9g4UjU-NVlJvZKHe0l3ms8I,7235
|
|
|
4
4
|
pumpkin_api/wit/block-entity.wit,sha256=UtPgcxtaOL50-mV3rskGYlSVoy0Q9SvqO02lGHXzF0U,1349
|
|
5
5
|
pumpkin_api/wit/boss-bar.wit,sha256=Th8NF4JrCQJxe57D9eBGm-aTxd05kBquAYc_VueXmmo,2625
|
|
6
6
|
pumpkin_api/wit/command.wit,sha256=KmWN6VSxNUz21CAruQfUtpc0HHOIe6ESvDdR5p_mTBs,4659
|
|
7
|
-
pumpkin_api/wit/common.wit,sha256=
|
|
7
|
+
pumpkin_api/wit/common.wit,sha256=ZhwWoQQqhf_Is99uLA2dgHye4qitq6G3xVr0vGV86m0,4276
|
|
8
8
|
pumpkin_api/wit/context.wit,sha256=-cFh8YUsXzfSDq26nIesYm4mjzPbtSh5jrpn_djScv8,1388
|
|
9
9
|
pumpkin_api/wit/entity.wit,sha256=OwmIfY-_6VkwD5beRAo_OMa7ig_XbS0a72qpblC91P4,46
|
|
10
|
-
pumpkin_api/wit/event.wit,sha256=
|
|
11
|
-
pumpkin_api/wit/gui.wit,sha256=
|
|
10
|
+
pumpkin_api/wit/event.wit,sha256=gHE_pB7v6Wy5ZPCAo9gntqhn00flQEavyPtm_W2njhI,9008
|
|
11
|
+
pumpkin_api/wit/gui.wit,sha256=u1J3JizHnHggLapRfylzX_VIobZto7aW8NKslU4E9gQ,1667
|
|
12
12
|
pumpkin_api/wit/i18n.wit,sha256=eAeFkI2N-5MG4cc_-g0-mpOsX1BzF6clAZ603PvWweg,758
|
|
13
13
|
pumpkin_api/wit/log.wit,sha256=h7j6AO9uUKcWVC70j6GLC3vQXuy-CcICRqfIDmtXg0o,309
|
|
14
14
|
pumpkin_api/wit/metadata.wit,sha256=nezu18ck20EnJ-m199-9u7Xh5ohleU_q6WD0J6M4Go8,487
|
|
15
15
|
pumpkin_api/wit/permission.wit,sha256=3LLdPwL0TcKvfp28ZFthdFOtXWKJgf0d1aEO95UM0b4,1653
|
|
16
|
-
pumpkin_api/wit/player.wit,sha256=
|
|
16
|
+
pumpkin_api/wit/player.wit,sha256=4BKr67GRApPo41429OcRJJNW4q0NXQ39DCu31hbY-Vw,8859
|
|
17
17
|
pumpkin_api/wit/plugin.wit,sha256=LrpupaW7OJoAvkRI7rhCjgqU3x063MpXRFn5Wi3C18Q,2457
|
|
18
18
|
pumpkin_api/wit/scheduler.wit,sha256=lBpuJQwnreK1JcfXtuD6WZzYJ62M1fpa0M4UZ7KFkPo,1176
|
|
19
19
|
pumpkin_api/wit/scoreboard.wit,sha256=pR7tcQeL3i9aWB7vFKYkHM4uQIyqIIGsRkGA22oJF-M,2009
|
|
20
|
-
pumpkin_api/wit/server.wit,sha256=
|
|
20
|
+
pumpkin_api/wit/server.wit,sha256=HSUtLtYsAAGL6vN_n7Sj3ufT52l7x9bOaoeVhfoxAoo,3542
|
|
21
21
|
pumpkin_api/wit/text.wit,sha256=IjdNsXxTzxTEOsSuDMmfF0hFsA4kuKkANW7HvMypUU8,1375
|
|
22
|
-
pumpkin_api/wit/world.wit,sha256
|
|
22
|
+
pumpkin_api/wit/world.wit,sha256=-I3KPjFpoos4ZlbdVVBi3fmfpsjKhmomqopJt--vaXQ,8095
|
|
23
23
|
./componentize_py_runtime.pyi,sha256=3suTYQdRo3dzsP7919mJBuxuwNbUbjnQPiMcaXZs3ic,1109
|
|
24
24
|
./componentize_py_types.py,sha256=SWM0sddLchor0Un7py0s4j-2kZQylrdpWzxmLPDHBJQ,327
|
|
25
25
|
./poll_loop.py,sha256=KUBgZTycS3Ek-a-GPQebovucd2BumNe0c2XFwupKGHI,12181
|
|
@@ -33,21 +33,21 @@ pumpkin_api/wit/world.wit,sha256=3lmQ9PL4tAQMweCRan-cRLtWKBTZX51F_mGKqDz-GSo,703
|
|
|
33
33
|
./wit_world/imports/block_entity.py,sha256=GwmYkITX3BDfHef9Xj6TBmuyG7AuWlVrauucSUjvPdI,2692
|
|
34
34
|
./wit_world/imports/boss_bar.py,sha256=CdbDxyG-CfpDhV66dnJcdISqozlBPwq9JXIh65IMN7w,3906
|
|
35
35
|
./wit_world/imports/command.py,sha256=AMIIx2iGkKSfcfX-SpNrSJEnl4CUjBJRJ_5zn82iDQE,10512
|
|
36
|
-
./wit_world/imports/common.py,sha256=
|
|
36
|
+
./wit_world/imports/common.py,sha256=saUG1PGdqX1THonOL5T0iaUrWkqByhGGMuwdoUohCAU,4188
|
|
37
37
|
./wit_world/imports/context.py,sha256=zxp4bKS8bFI0wFrJgBn8DFO8CoIGG0L4b7JcHYdZJSM,2452
|
|
38
|
-
./wit_world/imports/event.py,sha256=
|
|
39
|
-
./wit_world/imports/gui.py,sha256=
|
|
38
|
+
./wit_world/imports/event.py,sha256=mp-KFuPUwkWjqFreH26CH9NdEXspFWLd5Do9S-S-CJ0,10387
|
|
39
|
+
./wit_world/imports/gui.py,sha256=pHoFVb9n-VjyfztkApmBH8pnkjtECwKOiuZnKD6p1rA,2901
|
|
40
40
|
./wit_world/imports/i18n.py,sha256=gBG038CJr91bGuc7BSqR8xDmS15YT2sh6B3fWOnCIZk,1179
|
|
41
41
|
./wit_world/imports/logging.py,sha256=vVWjK9fDjj7tGKHwfsSWDTtyDFmyr4mSw5VhLSLwLS8,762
|
|
42
42
|
./wit_world/imports/permission.py,sha256=gijthLLFfZs0GVBVCsZwhnX3tMAQa8dozE934sqQ8xY,1770
|
|
43
|
-
./wit_world/imports/player.py,sha256=
|
|
43
|
+
./wit_world/imports/player.py,sha256=nLbPrTkHbQn5ln9iwo90OdoPkfjBh-WctRbDaUduXUs,12877
|
|
44
44
|
./wit_world/imports/scheduler.py,sha256=sI7Axa6jSCvPg9DbeKjbRPSRQPMMUUXMN636gVjwACY,1625
|
|
45
45
|
./wit_world/imports/scoreboard.py,sha256=zixPPHtgRjJHUWtEBBncvVJnrg4DwlmdJnHZSwNSO1U,3030
|
|
46
|
-
./wit_world/imports/server.py,sha256=
|
|
46
|
+
./wit_world/imports/server.py,sha256=_1CrNxXHMMvOxrdP37VkhPsjTCcX7Z1Swuj_Euf6f54,5409
|
|
47
47
|
./wit_world/imports/text.py,sha256=QJej3ya2GDsQF2_5xbCcKe6sKsxSGC2TNzEAAjPFVA0,3031
|
|
48
|
-
./wit_world/imports/world.py,sha256=
|
|
49
|
-
pumpkin_api_py-0.1.0.
|
|
50
|
-
pumpkin_api_py-0.1.0.
|
|
51
|
-
pumpkin_api_py-0.1.0.
|
|
52
|
-
pumpkin_api_py-0.1.0.
|
|
53
|
-
pumpkin_api_py-0.1.0.
|
|
48
|
+
./wit_world/imports/world.py,sha256=G2JAIcGEgTdy4y2utSbC3iCod0xZXA3ynv_VbmY4l-0,10231
|
|
49
|
+
pumpkin_api_py-0.1.0.dev3.dist-info/METADATA,sha256=SwV4CWwVAhV-7892Xa7zS9rZ4rtdgGkemPo6083nvtk,1212
|
|
50
|
+
pumpkin_api_py-0.1.0.dev3.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
51
|
+
pumpkin_api_py-0.1.0.dev3.dist-info/entry_points.txt,sha256=iPEUhVo3qB9KUZDtQWPnRbfg8ReUEouzRHDLOWaNNW0,64
|
|
52
|
+
pumpkin_api_py-0.1.0.dev3.dist-info/licenses/LICENSE,sha256=1Oq26e5aRaugKmSso0nYTJB_TsOoAWtYhTgje1HgFqw,35122
|
|
53
|
+
pumpkin_api_py-0.1.0.dev3.dist-info/RECORD,,
|
wit_world/imports/common.py
CHANGED
|
@@ -77,6 +77,21 @@ class ItemStack:
|
|
|
77
77
|
registry_key: str
|
|
78
78
|
count: int
|
|
79
79
|
|
|
80
|
+
class ClickType(Enum):
|
|
81
|
+
"""
|
|
82
|
+
Represents the type of click interaction in a GUI.
|
|
83
|
+
"""
|
|
84
|
+
LEFT = 0
|
|
85
|
+
RIGHT = 1
|
|
86
|
+
SHIFT_LEFT = 2
|
|
87
|
+
SHIFT_RIGHT = 3
|
|
88
|
+
MIDDLE = 4
|
|
89
|
+
DROP = 5
|
|
90
|
+
CONTROL_DROP = 6
|
|
91
|
+
DOUBLE_CLICK = 7
|
|
92
|
+
NUMBER_KEY = 8
|
|
93
|
+
UNKNOWN = 9
|
|
94
|
+
|
|
80
95
|
class EntityPose(Enum):
|
|
81
96
|
"""
|
|
82
97
|
Represents the various poses an entity can be in.
|
wit_world/imports/event.py
CHANGED
|
@@ -184,6 +184,23 @@ class PlayerInteractUnknownEntityEventData:
|
|
|
184
184
|
action: EntityInteractionAction
|
|
185
185
|
cancelled: bool
|
|
186
186
|
|
|
187
|
+
@dataclass
|
|
188
|
+
class InventoryClickEventData:
|
|
189
|
+
player: player.Player
|
|
190
|
+
window_type: Optional[str]
|
|
191
|
+
click_type: common.ClickType
|
|
192
|
+
slot: int
|
|
193
|
+
raw_slot: int
|
|
194
|
+
clicked_item: Optional[common.ItemStack]
|
|
195
|
+
cursor: Optional[common.ItemStack]
|
|
196
|
+
hotbar_button: int
|
|
197
|
+
cancelled: bool
|
|
198
|
+
|
|
199
|
+
@dataclass
|
|
200
|
+
class InventoryCloseEventData:
|
|
201
|
+
player: player.Player
|
|
202
|
+
window_type: Optional[str]
|
|
203
|
+
|
|
187
204
|
@dataclass
|
|
188
205
|
class BlockRedstoneEventData:
|
|
189
206
|
target_world: world.World
|
|
@@ -278,15 +295,17 @@ class EventType(Enum):
|
|
|
278
295
|
PLAYER_TOGGLE_SNEAK_EVENT = 18
|
|
279
296
|
PLAYER_TOGGLE_FLIGHT_EVENT = 19
|
|
280
297
|
PLAYER_TOGGLE_SPRINT_EVENT = 20
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
298
|
+
INVENTORY_CLICK_EVENT = 21
|
|
299
|
+
INVENTORY_CLOSE_EVENT = 22
|
|
300
|
+
BLOCK_REDSTONE_EVENT = 23
|
|
301
|
+
BLOCK_BREAK_EVENT = 24
|
|
302
|
+
BLOCK_BURN_EVENT = 25
|
|
303
|
+
BLOCK_CAN_BUILD_EVENT = 26
|
|
304
|
+
BLOCK_GROW_EVENT = 27
|
|
305
|
+
BLOCK_PLACE_EVENT = 28
|
|
306
|
+
SERVER_COMMAND_EVENT = 29
|
|
307
|
+
SPAWN_CHANGE_EVENT = 30
|
|
308
|
+
SERVER_BROADCAST_EVENT = 31
|
|
290
309
|
|
|
291
310
|
|
|
292
311
|
@dataclass
|
|
@@ -394,6 +413,16 @@ class Event_PlayerToggleSprintEvent:
|
|
|
394
413
|
value: PlayerToggleSprintEventData
|
|
395
414
|
|
|
396
415
|
|
|
416
|
+
@dataclass
|
|
417
|
+
class Event_InventoryClickEvent:
|
|
418
|
+
value: InventoryClickEventData
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
@dataclass
|
|
422
|
+
class Event_InventoryCloseEvent:
|
|
423
|
+
value: InventoryCloseEventData
|
|
424
|
+
|
|
425
|
+
|
|
397
426
|
@dataclass
|
|
398
427
|
class Event_BlockRedstoneEvent:
|
|
399
428
|
value: BlockRedstoneEventData
|
|
@@ -439,7 +468,7 @@ class Event_ServerBroadcastEvent:
|
|
|
439
468
|
value: ServerBroadcastEventData
|
|
440
469
|
|
|
441
470
|
|
|
442
|
-
Event = Union[Event_PlayerJoinEvent, Event_PlayerLeaveEvent, Event_PlayerLoginEvent, Event_PlayerChatEvent, Event_PlayerCommandSendEvent, Event_PlayerPermissionCheckEvent, Event_PlayerMoveEvent, Event_PlayerTeleportEvent, Event_PlayerChangeWorldEvent, Event_PlayerExpChangeEvent, Event_PlayerItemHeldEvent, Event_PlayerChangedMainHandEvent, Event_PlayerGamemodeChangeEvent, Event_PlayerCustomPayloadEvent, Event_PlayerFishEvent, Event_PlayerEggThrowEvent, Event_PlayerInteractUnknownEntityEvent, Event_PlayerInteractEvent, Event_PlayerToggleSneakEvent, Event_PlayerToggleFlightEvent, Event_PlayerToggleSprintEvent, Event_BlockRedstoneEvent, Event_BlockBreakEvent, Event_BlockBurnEvent, Event_BlockCanBuildEvent, Event_BlockGrowEvent, Event_BlockPlaceEvent, Event_ServerCommandEvent, Event_SpawnChangeEvent, Event_ServerBroadcastEvent]
|
|
471
|
+
Event = Union[Event_PlayerJoinEvent, Event_PlayerLeaveEvent, Event_PlayerLoginEvent, Event_PlayerChatEvent, Event_PlayerCommandSendEvent, Event_PlayerPermissionCheckEvent, Event_PlayerMoveEvent, Event_PlayerTeleportEvent, Event_PlayerChangeWorldEvent, Event_PlayerExpChangeEvent, Event_PlayerItemHeldEvent, Event_PlayerChangedMainHandEvent, Event_PlayerGamemodeChangeEvent, Event_PlayerCustomPayloadEvent, Event_PlayerFishEvent, Event_PlayerEggThrowEvent, Event_PlayerInteractUnknownEntityEvent, Event_PlayerInteractEvent, Event_PlayerToggleSneakEvent, Event_PlayerToggleFlightEvent, Event_PlayerToggleSprintEvent, Event_InventoryClickEvent, Event_InventoryCloseEvent, Event_BlockRedstoneEvent, Event_BlockBreakEvent, Event_BlockBurnEvent, Event_BlockCanBuildEvent, Event_BlockGrowEvent, Event_BlockPlaceEvent, Event_ServerCommandEvent, Event_SpawnChangeEvent, Event_ServerBroadcastEvent]
|
|
443
472
|
|
|
444
473
|
|
|
445
474
|
|
wit_world/imports/gui.py
CHANGED
|
@@ -67,6 +67,26 @@ class Gui:
|
|
|
67
67
|
Clears all items from the GUI.
|
|
68
68
|
"""
|
|
69
69
|
raise NotImplementedError
|
|
70
|
+
def set_allow_grab_items(self, allow: bool) -> None:
|
|
71
|
+
"""
|
|
72
|
+
Sets whether players can grab items out of the inventory.
|
|
73
|
+
"""
|
|
74
|
+
raise NotImplementedError
|
|
75
|
+
def get_allow_grab_items(self) -> bool:
|
|
76
|
+
"""
|
|
77
|
+
Returns whether players can grab items out of the inventory.
|
|
78
|
+
"""
|
|
79
|
+
raise NotImplementedError
|
|
80
|
+
def set_allow_put_items(self, allow: bool) -> None:
|
|
81
|
+
"""
|
|
82
|
+
Sets whether players can put items into the inventory from their own.
|
|
83
|
+
"""
|
|
84
|
+
raise NotImplementedError
|
|
85
|
+
def get_allow_put_items(self) -> bool:
|
|
86
|
+
"""
|
|
87
|
+
Returns whether players can put items into the inventory from their own.
|
|
88
|
+
"""
|
|
89
|
+
raise NotImplementedError
|
|
70
90
|
def __enter__(self) -> Self:
|
|
71
91
|
"""Returns self"""
|
|
72
92
|
return self
|
wit_world/imports/player.py
CHANGED
|
@@ -30,6 +30,26 @@ class PlayerAbilities:
|
|
|
30
30
|
fly_speed: float
|
|
31
31
|
walk_speed: float
|
|
32
32
|
|
|
33
|
+
@dataclass
|
|
34
|
+
class PlayerSkin:
|
|
35
|
+
"""
|
|
36
|
+
Represents a player's skin textures and metadata.
|
|
37
|
+
"""
|
|
38
|
+
value: str
|
|
39
|
+
signature: Optional[str]
|
|
40
|
+
|
|
41
|
+
class SkinParts(Flag):
|
|
42
|
+
"""
|
|
43
|
+
Flags representing visible skin parts.
|
|
44
|
+
"""
|
|
45
|
+
CAPE = auto()
|
|
46
|
+
JACKET = auto()
|
|
47
|
+
LEFT_SLEEVE = auto()
|
|
48
|
+
RIGHT_SLEEVE = auto()
|
|
49
|
+
LEFT_PANTS_LEG = auto()
|
|
50
|
+
RIGHT_PANTS_LEG = auto()
|
|
51
|
+
HAT = auto()
|
|
52
|
+
|
|
33
53
|
class Player:
|
|
34
54
|
"""
|
|
35
55
|
A handle to a player on the server.
|
|
@@ -102,6 +122,21 @@ class Player:
|
|
|
102
122
|
Sets the player's permission level.
|
|
103
123
|
"""
|
|
104
124
|
raise NotImplementedError
|
|
125
|
+
def set_permission(self, node: str, value: bool) -> None:
|
|
126
|
+
"""
|
|
127
|
+
Grants or denies a specific permission node for the player.
|
|
128
|
+
"""
|
|
129
|
+
raise NotImplementedError
|
|
130
|
+
def unset_permission(self, node: str) -> None:
|
|
131
|
+
"""
|
|
132
|
+
Removes an explicitly set permission node from the player.
|
|
133
|
+
"""
|
|
134
|
+
raise NotImplementedError
|
|
135
|
+
def has_permission_set(self, node: str) -> Optional[bool]:
|
|
136
|
+
"""
|
|
137
|
+
Returns `Some(true)` if granted, `Some(false)` if denied, or `None` if not set.
|
|
138
|
+
"""
|
|
139
|
+
raise NotImplementedError
|
|
105
140
|
def has_permission(self, node: str) -> bool:
|
|
106
141
|
"""
|
|
107
142
|
Checks if the player has a specific permission node.
|
|
@@ -316,31 +351,6 @@ class Player:
|
|
|
316
351
|
Adds experience points to the player.
|
|
317
352
|
"""
|
|
318
353
|
raise NotImplementedError
|
|
319
|
-
def is_sneaking(self) -> bool:
|
|
320
|
-
"""
|
|
321
|
-
Returns whether the player is currently sneaking.
|
|
322
|
-
"""
|
|
323
|
-
raise NotImplementedError
|
|
324
|
-
def set_sneaking(self, sneaking: bool) -> None:
|
|
325
|
-
"""
|
|
326
|
-
Sets whether the player is currently sneaking.
|
|
327
|
-
"""
|
|
328
|
-
raise NotImplementedError
|
|
329
|
-
def is_sprinting(self) -> bool:
|
|
330
|
-
"""
|
|
331
|
-
Returns whether the player is currently sprinting.
|
|
332
|
-
"""
|
|
333
|
-
raise NotImplementedError
|
|
334
|
-
def set_sprinting(self, sprinting: bool) -> None:
|
|
335
|
-
"""
|
|
336
|
-
Sets whether the player is currently sprinting.
|
|
337
|
-
"""
|
|
338
|
-
raise NotImplementedError
|
|
339
|
-
def is_on_ground(self) -> bool:
|
|
340
|
-
"""
|
|
341
|
-
Returns whether the player is currently on the ground.
|
|
342
|
-
"""
|
|
343
|
-
raise NotImplementedError
|
|
344
354
|
def is_flying(self) -> bool:
|
|
345
355
|
"""
|
|
346
356
|
Returns whether the player is currently flying.
|
|
@@ -366,6 +376,21 @@ class Player:
|
|
|
366
376
|
Returns the player's IP address.
|
|
367
377
|
"""
|
|
368
378
|
raise NotImplementedError
|
|
379
|
+
def get_skin(self) -> Optional[PlayerSkin]:
|
|
380
|
+
"""
|
|
381
|
+
Returns the player's current skin textures.
|
|
382
|
+
"""
|
|
383
|
+
raise NotImplementedError
|
|
384
|
+
def get_skin_parts(self) -> SkinParts:
|
|
385
|
+
"""
|
|
386
|
+
Returns the currently visible skin parts.
|
|
387
|
+
"""
|
|
388
|
+
raise NotImplementedError
|
|
389
|
+
def set_skin_parts(self, parts: SkinParts) -> None:
|
|
390
|
+
"""
|
|
391
|
+
Sets which skin parts are visible.
|
|
392
|
+
"""
|
|
393
|
+
raise NotImplementedError
|
|
369
394
|
def __enter__(self) -> Self:
|
|
370
395
|
"""Returns self"""
|
|
371
396
|
return self
|
wit_world/imports/server.py
CHANGED
|
@@ -22,6 +22,28 @@ class Difficulty(Enum):
|
|
|
22
22
|
NORMAL = 2
|
|
23
23
|
HARD = 3
|
|
24
24
|
|
|
25
|
+
class Dimension(Enum):
|
|
26
|
+
"""
|
|
27
|
+
Represents the three main Minecraft dimensions.
|
|
28
|
+
"""
|
|
29
|
+
OVERWORLD = 0
|
|
30
|
+
NETHER = 1
|
|
31
|
+
END = 2
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@dataclass
|
|
35
|
+
class CommandSender_Console:
|
|
36
|
+
pass
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@dataclass
|
|
40
|
+
class CommandSender_Player:
|
|
41
|
+
value: player.Player
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
CommandSender = Union[CommandSender_Console, CommandSender_Player]
|
|
45
|
+
|
|
46
|
+
|
|
25
47
|
class Server:
|
|
26
48
|
"""
|
|
27
49
|
Represents the global server instance.
|
|
@@ -74,6 +96,14 @@ class Server:
|
|
|
74
96
|
Gets a world by its dimension name (e.g., "minecraft:overworld").
|
|
75
97
|
"""
|
|
76
98
|
raise NotImplementedError
|
|
99
|
+
def execute_command(self, command: str, sender: CommandSender) -> None:
|
|
100
|
+
raise NotImplementedError
|
|
101
|
+
def create_world(self, name: str, dimension: Dimension) -> world.World:
|
|
102
|
+
"""
|
|
103
|
+
Creates or loads a world by its name and dimension.
|
|
104
|
+
If a world with the given name already exists, it will be returned.
|
|
105
|
+
"""
|
|
106
|
+
raise NotImplementedError
|
|
77
107
|
def broadcast(self, message: str) -> None:
|
|
78
108
|
"""
|
|
79
109
|
Broadcasts a system chat message to all players.
|
wit_world/imports/world.py
CHANGED
|
@@ -218,6 +218,25 @@ class World:
|
|
|
218
218
|
raise NotImplementedError
|
|
219
219
|
|
|
220
220
|
|
|
221
|
+
class BlockDirection(Enum):
|
|
222
|
+
"""
|
|
223
|
+
Represents a cardinal direction or block face.
|
|
224
|
+
"""
|
|
225
|
+
DOWN = 0
|
|
226
|
+
UP = 1
|
|
227
|
+
NORTH = 2
|
|
228
|
+
SOUTH = 3
|
|
229
|
+
WEST = 4
|
|
230
|
+
EAST = 5
|
|
231
|
+
|
|
232
|
+
@dataclass
|
|
233
|
+
class RaycastResult:
|
|
234
|
+
"""
|
|
235
|
+
Result of a raycast operation.
|
|
236
|
+
"""
|
|
237
|
+
pos: BlockPos
|
|
238
|
+
face: BlockDirection
|
|
239
|
+
|
|
221
240
|
class Entity:
|
|
222
241
|
|
|
223
242
|
def get_id(self) -> int:
|
|
@@ -240,12 +259,32 @@ class Entity:
|
|
|
240
259
|
raise NotImplementedError
|
|
241
260
|
def is_sneaking(self) -> bool:
|
|
242
261
|
raise NotImplementedError
|
|
262
|
+
def set_sneaking(self, sneaking: bool) -> None:
|
|
263
|
+
raise NotImplementedError
|
|
243
264
|
def is_sprinting(self) -> bool:
|
|
244
265
|
raise NotImplementedError
|
|
266
|
+
def set_sprinting(self, sprinting: bool) -> None:
|
|
267
|
+
raise NotImplementedError
|
|
268
|
+
def is_swimming(self) -> bool:
|
|
269
|
+
raise NotImplementedError
|
|
270
|
+
def set_swimming(self, swimming: bool) -> None:
|
|
271
|
+
raise NotImplementedError
|
|
245
272
|
def is_invisible(self) -> bool:
|
|
246
273
|
raise NotImplementedError
|
|
274
|
+
def set_invisible(self, invisible: bool) -> None:
|
|
275
|
+
raise NotImplementedError
|
|
247
276
|
def is_glowing(self) -> bool:
|
|
248
277
|
raise NotImplementedError
|
|
278
|
+
def set_glowing(self, glowing: bool) -> None:
|
|
279
|
+
raise NotImplementedError
|
|
280
|
+
def is_fall_flying(self) -> bool:
|
|
281
|
+
raise NotImplementedError
|
|
282
|
+
def set_fall_flying(self, fall_flying: bool) -> None:
|
|
283
|
+
raise NotImplementedError
|
|
284
|
+
def is_on_fire(self) -> bool:
|
|
285
|
+
raise NotImplementedError
|
|
286
|
+
def set_on_fire(self, on_fire: bool) -> None:
|
|
287
|
+
raise NotImplementedError
|
|
249
288
|
def teleport(self, pos: Tuple[float, float, float], world_ref: World) -> None:
|
|
250
289
|
raise NotImplementedError
|
|
251
290
|
def set_velocity(self, velocity: Tuple[float, float, float]) -> None:
|
|
@@ -274,6 +313,11 @@ class Entity:
|
|
|
274
313
|
raise NotImplementedError
|
|
275
314
|
def remove(self) -> None:
|
|
276
315
|
raise NotImplementedError
|
|
316
|
+
def raycast(self, max_distance: float, fluid_handling: bool) -> Optional[RaycastResult]:
|
|
317
|
+
"""
|
|
318
|
+
Performs a raycast from the entity's eye position in its looking direction.
|
|
319
|
+
"""
|
|
320
|
+
raise NotImplementedError
|
|
277
321
|
def __enter__(self) -> Self:
|
|
278
322
|
"""Returns self"""
|
|
279
323
|
return self
|
|
File without changes
|
{pumpkin_api_py-0.1.0.dev2.dist-info → pumpkin_api_py-0.1.0.dev3.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{pumpkin_api_py-0.1.0.dev2.dist-info → pumpkin_api_py-0.1.0.dev3.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|