Skip to content

Commit 92fd00d

Browse files
authored
add type values to packetTest (#1023)
* add varlong value to packetTest * add command_node type value in packetTest
1 parent 446d1d9 commit 92fd00d

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

test/packetTest.js

+25-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const values = {
4040
i16: -123,
4141
u16: 123,
4242
varint: 1,
43+
varlong: -10,
4344
i8: -10,
4445
u8: 8,
4546
string: 'hi hi this is my client string',
@@ -176,7 +177,30 @@ const values = {
176177
tags: [{ tagName: 'hi', entries: [1, 2, 3, 4, 5] }],
177178
ingredient: [slotValue],
178179
particleData: null,
179-
chunkBlockEntity: { x: 10, y: 11, z: 12, type: 25 }
180+
chunkBlockEntity: { x: 10, y: 11, z: 12, type: 25 },
181+
command_node: {
182+
flags: {
183+
has_custom_suggestions: 1,
184+
has_redirect_node: 1,
185+
has_command: 1,
186+
command_node_type: 2
187+
},
188+
children: [23, 29],
189+
redirectNode: 83,
190+
extraNodeData: {
191+
name: 'command_node name',
192+
parser: 'brigadier:double',
193+
properties: {
194+
flags: {
195+
max_present: 1,
196+
min_present: 1
197+
},
198+
min: -5.0,
199+
max: 256.0
200+
},
201+
suggestionType: 'minecraft:summonable_entities'
202+
}
203+
}
180204
}
181205

182206
function getValue (_type, packet) {

0 commit comments

Comments
 (0)