├── .github
└── dependabot.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── export-symbols.py
├── helper.sh
├── input_files
└── r12_block_states.json
├── mapping_files
└── .keep
├── print_enum.py
├── protocol_info_dumper.py
├── python_requirements.txt
├── scripts
├── build
├── clean-server
├── export-server-symbols
├── gen
├── install-modloader
├── install-server
├── setup
└── shared
├── start.sh
└── tracer.py
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: gitsubmodule
4 | directory: "/"
5 | schedule:
6 | interval: daily
7 | time: "10:00"
8 | open-pull-requests-limit: 10
9 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/*
2 | build/*
3 | cmake-build-debug/*
4 | mods/
5 | mapping_files/
6 | CMakeCache.txt
7 | Dedicated_Server.txt
8 | ChunkPerformanceData_Log.csv
9 | packets_*.txt
10 | bedrock_server*
11 | invalid_known_packs.json
12 | valid_known_packs.json
13 | resource_packs/
14 | behavior_packs/
15 | sdk/
16 | permissions.json
17 | whitelist.json
18 | CMakeFiles/
19 | structures/
20 | definitions/
21 | packet-statistics.txt
22 | permissions.json
23 | *.so
24 | worlds/
25 | cmake_install.cmake
26 | ContentLog*.txt
27 | server.properties
28 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "input_files/old_block_palettes"]
2 | path = input_files/old_block_palettes
3 | url = git@github.com:pmmp/BlockPaletteArchive
4 | [submodule "code/mapping"]
5 | path = code/mapping
6 | url = git@github.com:pmmp/bds-mod-mapping.git
7 | [submodule "code/coremod"]
8 | path = code/coremod
9 | url = git@github.com:minecraft-linux/server-modloader-coremod.git
10 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # bds-modding-devkit
2 | This developer kit allows you to quickly and easily start modding the Bedrock Dedicated Server.
3 |
4 | It's used for dumping information for protocol updates for PocketMine-MP, but the tools provided here can be used for much more than that.
5 |
6 | The following mods are included as git submodules:
7 | - [minecraft-linux/server-modloader-coremod](https://github.com/minecraft-linux/server-modloader-coremod)
8 | - [pmmp/bds-mod-mapping](https://github.com/pmmp/bds-mod-mapping)
9 |
10 | ## Things you'll need
11 | - A Linux environment with a 5.4 kernel or newer (WSL2 is fine)
12 | - `python3`
13 | - `pip`
14 | - `clang`
15 | - `libc++-dev`
16 | - `libc++abi-dev`
17 | - `binutils` (for `protocol_info_dumper.py`)
18 | - [LIEF](https://github.com/lief-project/LIEF): `python3 -m pip install lief~=0.14.0` (note: lief >=0.15.0 is currently NOT supported)
19 | - [Frida](https://frida.re): `python3 -m pip install frida frida-tools` (for `tracer.py`)
20 | - A folder or zip of [Bedrock Dedicated Server](https://minecraft.net/download/server/bedrock)
21 |
22 | ## Getting started in 60 seconds
23 | 1. Clone the repo
24 | 2. `git submodule update --init`
25 | 3. `./scripts/setup path/to/bds/server/files` or `./scripts/setup path/to/bds.zip`
26 | 4. `./start.sh` to run the server with mods loaded
27 |
28 | Run `./helper.sh help` to get more usage info.
29 |
30 | ## Things in the repo
31 | | File name | Description |
32 | |:----------|:------------|
33 | | `export-symbols.py` | Uses [LIEF](https://github.com/lief-project/LIEF) to patch BDS and make the symbols linkable |
34 | | `helper.sh` | Helper script based on [modloader-helper](https://github.com/Frago9876543210/modloader-helper) |
35 | | `protocol_info_dumper.py` | Uses `objdump` to dump basic version info and packet ID lists from BDS for data generation |
36 | | `start.sh` | Runs the server with mods loaded. From [modloader-helper](https://github.com/Frago9876543210/modloader-helper) |
37 | | `tracer.py` | Uses [Frida](https://frida.re) to hook packet functions in BDS and create packet traces. Run this while you have a BDS instance already running. Requires `sudo`. |
38 |
39 | ## Adding your own mods
40 | Mod code is placed in the `code` directory. Build them by invoking `./scripts/build all`.
41 |
42 | To generate skeleton files for a new mod, use the tool `./scripts/gen`.
43 |
44 | ## Credits
45 | - [@Frago9876543210](https://github.com/Frago9876543210)
46 | - Writing [modloader-helper](https://github.com/Frago9876543210/modloader-helper)
47 | - Writing the original version of [mapping](https://github.com/pmmp/mapping)
48 | - Revamping `tracer.py` ([gist](https://gist.github.com/Frago9876543210/2e5de55f1bb7e42594b73f5665391bf4#file-tracer-py))
49 | - [@MCMrARM](https://github.com/MCMrARM)
50 | - Creating [server-modloader](https://github.com/minecraft-linux/server-modloader), without which this endeavour would simply not be possible.
51 | - Writing `export-symbols.py`
52 | - [@Intyre](https://github.com/Intyre)
53 | - Helping me to write the initial versions of `tracer.py` which are still used today
54 |
--------------------------------------------------------------------------------
/export-symbols.py:
--------------------------------------------------------------------------------
1 | import lief
2 | import sys
3 |
4 | if len(sys.argv) < 3:
5 | print("Required arguments: input path, output path")
6 | exit(1)
7 |
8 |
9 | lib_symbols = lief.parse(sys.argv[1])
10 | if lib_symbols is None:
11 | print("Error opening given BDS file, aborting")
12 | exit(1)
13 |
14 | for s in lib_symbols.symtab_symbols:
15 | #only modify local symbols to minimize scope
16 | s.visibility = lief.ELF.Symbol.VISIBILITY.DEFAULT
17 | if s.binding == lief.ELF.Symbol.BINDING.LOCAL:
18 | s.binding = lief.ELF.Symbol.BINDING.GLOBAL
19 | lib_symbols.add_dynamic_symbol(s)
20 | lib_symbols.write(sys.argv[2])
21 |
--------------------------------------------------------------------------------
/helper.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | R=$(echo -en '\033[0m')
3 | LR=$(echo -en '\033[01;31m')
4 | LG=$(echo -en '\033[01;32m')
5 | LY=$(echo -en '\033[01;33m')
6 | LC=$(echo -en '\033[01;36m')
7 | W=$(echo -en '\033[01;37m')
8 |
9 | show_help(){
10 | echo "${LC}Usage: $LG$0 ${LR}command ${LC}<${LY}arguments${LC}>
11 |
12 | ${LG}Available commands:
13 | ${LR}setup ${LC}<${LY}server files path${LC}>${W} — ${LC}sets everything up from scratch for the first time
14 | ${LR}clean-server${W} — ${LC}removes the old server binaries, leaving configs and worlds intact
15 | ${LR}install-server ${LC}<${LY}server files path${LC}>${W} — ${LC}installs server files from the given directory
16 | ${LR}install-modloader${W} — ${LC}installs latest ModLoader binaries and SDK
17 | ${LR}gen ${LC}<${LY}name${LC}>${W} — ${LC}generates template for mod
18 | ${LR}build ${LC}<${LY}all${LC}|${LY}name${LC}>${W} — ${LC}builds all mods or selected$R"
19 | }
20 |
21 | case $1 in
22 | "setup")
23 | ./scripts/setup "$@"
24 | ;;
25 | "clean-server")
26 | ./scripts/clean-server "$@"
27 | ;;
28 | "install-server")
29 | ./scripts/install-server "$@"
30 | ;;
31 | "export-server-symbols")
32 | ./scripts/export-server-symbols "$@"
33 | ;;
34 | "install-modloader")
35 | ./scripts/install-modloader "$@"
36 | ;;
37 | "gen")
38 | ./scripts/gen "$@"
39 | ;;
40 | "build")
41 | ./scripts/build "$@"
42 | ;;
43 | *)
44 | show_help
45 | ;;
46 | esac
47 |
--------------------------------------------------------------------------------
/input_files/r12_block_states.json:
--------------------------------------------------------------------------------
1 | {
2 | "minecraft": {
3 | "acacia_button": [
4 | 0,
5 | 1,
6 | 2,
7 | 3,
8 | 4,
9 | 5,
10 | 6,
11 | 7,
12 | 8,
13 | 9,
14 | 10,
15 | 11,
16 | 12,
17 | 13,
18 | 14,
19 | 15
20 | ],
21 | "acacia_door": [
22 | 0,
23 | 1,
24 | 2,
25 | 3,
26 | 4,
27 | 5,
28 | 6,
29 | 7,
30 | 8,
31 | 9,
32 | 10,
33 | 11,
34 | 12,
35 | 13,
36 | 14,
37 | 15,
38 | 16,
39 | 17,
40 | 18,
41 | 19,
42 | 20,
43 | 21,
44 | 22,
45 | 23,
46 | 24,
47 | 25,
48 | 26,
49 | 27,
50 | 28,
51 | 29,
52 | 30,
53 | 31
54 | ],
55 | "acacia_fence_gate": [
56 | 0,
57 | 1,
58 | 2,
59 | 3,
60 | 4,
61 | 5,
62 | 6,
63 | 7,
64 | 8,
65 | 9,
66 | 10,
67 | 11,
68 | 12,
69 | 13,
70 | 14,
71 | 15
72 | ],
73 | "acacia_pressure_plate": [
74 | 0,
75 | 1,
76 | 2,
77 | 3,
78 | 4,
79 | 5,
80 | 6,
81 | 7,
82 | 8,
83 | 9,
84 | 10,
85 | 11,
86 | 12,
87 | 13,
88 | 14,
89 | 15
90 | ],
91 | "acacia_stairs": [
92 | 0,
93 | 1,
94 | 2,
95 | 3,
96 | 4,
97 | 5,
98 | 6,
99 | 7
100 | ],
101 | "acacia_standing_sign": [
102 | 0,
103 | 1,
104 | 2,
105 | 3,
106 | 4,
107 | 5,
108 | 6,
109 | 7,
110 | 8,
111 | 9,
112 | 10,
113 | 11,
114 | 12,
115 | 13,
116 | 14,
117 | 15
118 | ],
119 | "acacia_trapdoor": [
120 | 0,
121 | 1,
122 | 2,
123 | 3,
124 | 4,
125 | 5,
126 | 6,
127 | 7,
128 | 8,
129 | 9,
130 | 10,
131 | 11,
132 | 12,
133 | 13,
134 | 14,
135 | 15
136 | ],
137 | "acacia_wall_sign": [
138 | 0,
139 | 1,
140 | 2,
141 | 3,
142 | 4,
143 | 5,
144 | 6,
145 | 7
146 | ],
147 | "activator_rail": [
148 | 0,
149 | 1,
150 | 2,
151 | 3,
152 | 4,
153 | 5,
154 | 6,
155 | 7,
156 | 8,
157 | 9,
158 | 10,
159 | 11,
160 | 12,
161 | 13,
162 | 14,
163 | 15
164 | ],
165 | "air": [
166 | 0
167 | ],
168 | "andesite_stairs": [
169 | 0,
170 | 1,
171 | 2,
172 | 3,
173 | 4,
174 | 5,
175 | 6,
176 | 7
177 | ],
178 | "anvil": [
179 | 0,
180 | 1,
181 | 2,
182 | 3,
183 | 4,
184 | 5,
185 | 6,
186 | 7,
187 | 8,
188 | 9,
189 | 10,
190 | 11,
191 | 12,
192 | 13,
193 | 14,
194 | 15
195 | ],
196 | "bamboo": [
197 | 0,
198 | 1,
199 | 2,
200 | 3,
201 | 4,
202 | 5,
203 | 6,
204 | 7,
205 | 8,
206 | 9,
207 | 10,
208 | 11,
209 | 12,
210 | 13,
211 | 14,
212 | 15
213 | ],
214 | "bamboo_sapling": [
215 | 0,
216 | 1,
217 | 2,
218 | 3,
219 | 4,
220 | 5,
221 | 6,
222 | 7,
223 | 8,
224 | 9,
225 | 10,
226 | 11,
227 | 12,
228 | 13,
229 | 14,
230 | 15
231 | ],
232 | "barrel": [
233 | 0,
234 | 1,
235 | 2,
236 | 3,
237 | 4,
238 | 5,
239 | 6,
240 | 7,
241 | 8,
242 | 9,
243 | 10,
244 | 11,
245 | 12,
246 | 13,
247 | 14,
248 | 15
249 | ],
250 | "barrier": [
251 | 0
252 | ],
253 | "beacon": [
254 | 0
255 | ],
256 | "bed": [
257 | 0,
258 | 1,
259 | 2,
260 | 3,
261 | 4,
262 | 5,
263 | 6,
264 | 7,
265 | 8,
266 | 9,
267 | 10,
268 | 11,
269 | 12,
270 | 13,
271 | 14,
272 | 15
273 | ],
274 | "bedrock": [
275 | 0,
276 | 1
277 | ],
278 | "beetroot": [
279 | 0,
280 | 1,
281 | 2,
282 | 3,
283 | 4,
284 | 5,
285 | 6,
286 | 7
287 | ],
288 | "bell": [
289 | 0,
290 | 1,
291 | 2,
292 | 3,
293 | 4,
294 | 5,
295 | 6,
296 | 7,
297 | 8,
298 | 9,
299 | 10,
300 | 11,
301 | 12,
302 | 13,
303 | 14,
304 | 15,
305 | 16,
306 | 17,
307 | 18,
308 | 19,
309 | 20,
310 | 21,
311 | 22,
312 | 23,
313 | 24,
314 | 25,
315 | 26,
316 | 27,
317 | 28,
318 | 29,
319 | 30,
320 | 31
321 | ],
322 | "birch_button": [
323 | 0,
324 | 1,
325 | 2,
326 | 3,
327 | 4,
328 | 5,
329 | 6,
330 | 7,
331 | 8,
332 | 9,
333 | 10,
334 | 11,
335 | 12,
336 | 13,
337 | 14,
338 | 15
339 | ],
340 | "birch_door": [
341 | 0,
342 | 1,
343 | 2,
344 | 3,
345 | 4,
346 | 5,
347 | 6,
348 | 7,
349 | 8,
350 | 9,
351 | 10,
352 | 11,
353 | 12,
354 | 13,
355 | 14,
356 | 15,
357 | 16,
358 | 17,
359 | 18,
360 | 19,
361 | 20,
362 | 21,
363 | 22,
364 | 23,
365 | 24,
366 | 25,
367 | 26,
368 | 27,
369 | 28,
370 | 29,
371 | 30,
372 | 31
373 | ],
374 | "birch_fence_gate": [
375 | 0,
376 | 1,
377 | 2,
378 | 3,
379 | 4,
380 | 5,
381 | 6,
382 | 7,
383 | 8,
384 | 9,
385 | 10,
386 | 11,
387 | 12,
388 | 13,
389 | 14,
390 | 15
391 | ],
392 | "birch_pressure_plate": [
393 | 0,
394 | 1,
395 | 2,
396 | 3,
397 | 4,
398 | 5,
399 | 6,
400 | 7,
401 | 8,
402 | 9,
403 | 10,
404 | 11,
405 | 12,
406 | 13,
407 | 14,
408 | 15
409 | ],
410 | "birch_stairs": [
411 | 0,
412 | 1,
413 | 2,
414 | 3,
415 | 4,
416 | 5,
417 | 6,
418 | 7
419 | ],
420 | "birch_standing_sign": [
421 | 0,
422 | 1,
423 | 2,
424 | 3,
425 | 4,
426 | 5,
427 | 6,
428 | 7,
429 | 8,
430 | 9,
431 | 10,
432 | 11,
433 | 12,
434 | 13,
435 | 14,
436 | 15
437 | ],
438 | "birch_trapdoor": [
439 | 0,
440 | 1,
441 | 2,
442 | 3,
443 | 4,
444 | 5,
445 | 6,
446 | 7,
447 | 8,
448 | 9,
449 | 10,
450 | 11,
451 | 12,
452 | 13,
453 | 14,
454 | 15
455 | ],
456 | "birch_wall_sign": [
457 | 0,
458 | 1,
459 | 2,
460 | 3,
461 | 4,
462 | 5,
463 | 6,
464 | 7
465 | ],
466 | "black_glazed_terracotta": [
467 | 0,
468 | 1,
469 | 2,
470 | 3,
471 | 4,
472 | 5,
473 | 6,
474 | 7
475 | ],
476 | "blast_furnace": [
477 | 0,
478 | 1,
479 | 2,
480 | 3,
481 | 4,
482 | 5,
483 | 6,
484 | 7
485 | ],
486 | "blue_glazed_terracotta": [
487 | 0,
488 | 1,
489 | 2,
490 | 3,
491 | 4,
492 | 5,
493 | 6,
494 | 7
495 | ],
496 | "blue_ice": [
497 | 0
498 | ],
499 | "bone_block": [
500 | 0,
501 | 1,
502 | 2,
503 | 3,
504 | 4,
505 | 5,
506 | 6,
507 | 7,
508 | 8,
509 | 9,
510 | 10,
511 | 11,
512 | 12,
513 | 13,
514 | 14,
515 | 15
516 | ],
517 | "bookshelf": [
518 | 0
519 | ],
520 | "brewing_stand": [
521 | 0,
522 | 1,
523 | 2,
524 | 3,
525 | 4,
526 | 5,
527 | 6,
528 | 7
529 | ],
530 | "brick_block": [
531 | 0
532 | ],
533 | "brick_stairs": [
534 | 0,
535 | 1,
536 | 2,
537 | 3,
538 | 4,
539 | 5,
540 | 6,
541 | 7
542 | ],
543 | "brown_glazed_terracotta": [
544 | 0,
545 | 1,
546 | 2,
547 | 3,
548 | 4,
549 | 5,
550 | 6,
551 | 7
552 | ],
553 | "brown_mushroom": [
554 | 0
555 | ],
556 | "brown_mushroom_block": [
557 | 0,
558 | 1,
559 | 2,
560 | 3,
561 | 4,
562 | 5,
563 | 6,
564 | 7,
565 | 8,
566 | 9,
567 | 10,
568 | 11,
569 | 12,
570 | 13,
571 | 14,
572 | 15
573 | ],
574 | "bubble_column": [
575 | 0,
576 | 1
577 | ],
578 | "cactus": [
579 | 0,
580 | 1,
581 | 2,
582 | 3,
583 | 4,
584 | 5,
585 | 6,
586 | 7,
587 | 8,
588 | 9,
589 | 10,
590 | 11,
591 | 12,
592 | 13,
593 | 14,
594 | 15
595 | ],
596 | "cake": [
597 | 0,
598 | 1,
599 | 2,
600 | 3,
601 | 4,
602 | 5,
603 | 6,
604 | 7
605 | ],
606 | "campfire": [
607 | 0,
608 | 1,
609 | 2,
610 | 3,
611 | 4,
612 | 5,
613 | 6,
614 | 7
615 | ],
616 | "carpet": [
617 | 0,
618 | 1,
619 | 2,
620 | 3,
621 | 4,
622 | 5,
623 | 6,
624 | 7,
625 | 8,
626 | 9,
627 | 10,
628 | 11,
629 | 12,
630 | 13,
631 | 14,
632 | 15
633 | ],
634 | "carrots": [
635 | 0,
636 | 1,
637 | 2,
638 | 3,
639 | 4,
640 | 5,
641 | 6,
642 | 7
643 | ],
644 | "cartography_table": [
645 | 0
646 | ],
647 | "carved_pumpkin": [
648 | 0,
649 | 1,
650 | 2,
651 | 3
652 | ],
653 | "cauldron": [
654 | 0,
655 | 1,
656 | 2,
657 | 3,
658 | 4,
659 | 5,
660 | 6,
661 | 7,
662 | 8,
663 | 9,
664 | 10,
665 | 11,
666 | 12,
667 | 13,
668 | 14,
669 | 15
670 | ],
671 | "chain_command_block": [
672 | 0,
673 | 1,
674 | 2,
675 | 3,
676 | 4,
677 | 5,
678 | 6,
679 | 7,
680 | 8,
681 | 9,
682 | 10,
683 | 11,
684 | 12,
685 | 13,
686 | 14,
687 | 15
688 | ],
689 | "chemical_heat": [
690 | 0
691 | ],
692 | "chemistry_table": [
693 | 0,
694 | 1,
695 | 2,
696 | 3,
697 | 4,
698 | 5,
699 | 6,
700 | 7,
701 | 8,
702 | 9,
703 | 10,
704 | 11,
705 | 12,
706 | 13,
707 | 14,
708 | 15
709 | ],
710 | "chest": [
711 | 0,
712 | 1,
713 | 2,
714 | 3,
715 | 4,
716 | 5,
717 | 6,
718 | 7
719 | ],
720 | "chorus_flower": [
721 | 0,
722 | 1,
723 | 2,
724 | 3,
725 | 4,
726 | 5,
727 | 6,
728 | 7
729 | ],
730 | "chorus_plant": [
731 | 0
732 | ],
733 | "clay": [
734 | 0
735 | ],
736 | "coal_block": [
737 | 0
738 | ],
739 | "coal_ore": [
740 | 0
741 | ],
742 | "cobblestone": [
743 | 0
744 | ],
745 | "cobblestone_wall": [
746 | 0,
747 | 1,
748 | 2,
749 | 3,
750 | 4,
751 | 5,
752 | 6,
753 | 7,
754 | 8,
755 | 9,
756 | 10,
757 | 11,
758 | 12,
759 | 13,
760 | 14,
761 | 15
762 | ],
763 | "cocoa": [
764 | 0,
765 | 1,
766 | 2,
767 | 3,
768 | 4,
769 | 5,
770 | 6,
771 | 7,
772 | 8,
773 | 9,
774 | 10,
775 | 11,
776 | 12,
777 | 13,
778 | 14,
779 | 15
780 | ],
781 | "colored_torch_bp": [
782 | 0,
783 | 1,
784 | 2,
785 | 3,
786 | 4,
787 | 5,
788 | 6,
789 | 7,
790 | 8,
791 | 9,
792 | 10,
793 | 11,
794 | 12,
795 | 13,
796 | 14,
797 | 15
798 | ],
799 | "colored_torch_rg": [
800 | 0,
801 | 1,
802 | 2,
803 | 3,
804 | 4,
805 | 5,
806 | 6,
807 | 7,
808 | 8,
809 | 9,
810 | 10,
811 | 11,
812 | 12,
813 | 13,
814 | 14,
815 | 15
816 | ],
817 | "command_block": [
818 | 0,
819 | 1,
820 | 2,
821 | 3,
822 | 4,
823 | 5,
824 | 6,
825 | 7,
826 | 8,
827 | 9,
828 | 10,
829 | 11,
830 | 12,
831 | 13,
832 | 14,
833 | 15
834 | ],
835 | "composter": [
836 | 0,
837 | 1,
838 | 2,
839 | 3,
840 | 4,
841 | 5,
842 | 6,
843 | 7,
844 | 8,
845 | 9,
846 | 10,
847 | 11,
848 | 12,
849 | 13,
850 | 14,
851 | 15
852 | ],
853 | "concrete": [
854 | 0,
855 | 1,
856 | 2,
857 | 3,
858 | 4,
859 | 5,
860 | 6,
861 | 7,
862 | 8,
863 | 9,
864 | 10,
865 | 11,
866 | 12,
867 | 13,
868 | 14,
869 | 15
870 | ],
871 | "concretePowder": [
872 | 0,
873 | 1,
874 | 2,
875 | 3,
876 | 4,
877 | 5,
878 | 6,
879 | 7,
880 | 8,
881 | 9,
882 | 10,
883 | 11,
884 | 12,
885 | 13,
886 | 14,
887 | 15
888 | ],
889 | "conduit": [
890 | 0
891 | ],
892 | "coral": [
893 | 0,
894 | 1,
895 | 2,
896 | 3,
897 | 4,
898 | 5,
899 | 6,
900 | 7
901 | ],
902 | "coral_block": [
903 | 0,
904 | 1,
905 | 2,
906 | 3,
907 | 4,
908 | 5,
909 | 6,
910 | 7,
911 | 8,
912 | 9,
913 | 10,
914 | 11,
915 | 12,
916 | 13,
917 | 14,
918 | 15
919 | ],
920 | "coral_fan": [
921 | 0,
922 | 1,
923 | 2,
924 | 3,
925 | 4,
926 | 5,
927 | 6,
928 | 7,
929 | 8,
930 | 9,
931 | 10,
932 | 11,
933 | 12,
934 | 13,
935 | 14,
936 | 15
937 | ],
938 | "coral_fan_dead": [
939 | 0,
940 | 1,
941 | 2,
942 | 3,
943 | 4,
944 | 5,
945 | 6,
946 | 7,
947 | 8,
948 | 9,
949 | 10,
950 | 11,
951 | 12,
952 | 13,
953 | 14,
954 | 15
955 | ],
956 | "coral_fan_hang": [
957 | 0,
958 | 1,
959 | 2,
960 | 3,
961 | 4,
962 | 5,
963 | 6,
964 | 7,
965 | 8,
966 | 9,
967 | 10,
968 | 11,
969 | 12,
970 | 13,
971 | 14,
972 | 15
973 | ],
974 | "coral_fan_hang2": [
975 | 0,
976 | 1,
977 | 2,
978 | 3,
979 | 4,
980 | 5,
981 | 6,
982 | 7,
983 | 8,
984 | 9,
985 | 10,
986 | 11,
987 | 12,
988 | 13,
989 | 14,
990 | 15
991 | ],
992 | "coral_fan_hang3": [
993 | 0,
994 | 1,
995 | 2,
996 | 3,
997 | 4,
998 | 5,
999 | 6,
1000 | 7,
1001 | 8,
1002 | 9,
1003 | 10,
1004 | 11,
1005 | 12,
1006 | 13,
1007 | 14,
1008 | 15
1009 | ],
1010 | "crafting_table": [
1011 | 0
1012 | ],
1013 | "cyan_glazed_terracotta": [
1014 | 0,
1015 | 1,
1016 | 2,
1017 | 3,
1018 | 4,
1019 | 5,
1020 | 6,
1021 | 7
1022 | ],
1023 | "dark_oak_button": [
1024 | 0,
1025 | 1,
1026 | 2,
1027 | 3,
1028 | 4,
1029 | 5,
1030 | 6,
1031 | 7,
1032 | 8,
1033 | 9,
1034 | 10,
1035 | 11,
1036 | 12,
1037 | 13,
1038 | 14,
1039 | 15
1040 | ],
1041 | "dark_oak_door": [
1042 | 0,
1043 | 1,
1044 | 2,
1045 | 3,
1046 | 4,
1047 | 5,
1048 | 6,
1049 | 7,
1050 | 8,
1051 | 9,
1052 | 10,
1053 | 11,
1054 | 12,
1055 | 13,
1056 | 14,
1057 | 15,
1058 | 16,
1059 | 17,
1060 | 18,
1061 | 19,
1062 | 20,
1063 | 21,
1064 | 22,
1065 | 23,
1066 | 24,
1067 | 25,
1068 | 26,
1069 | 27,
1070 | 28,
1071 | 29,
1072 | 30,
1073 | 31
1074 | ],
1075 | "dark_oak_fence_gate": [
1076 | 0,
1077 | 1,
1078 | 2,
1079 | 3,
1080 | 4,
1081 | 5,
1082 | 6,
1083 | 7,
1084 | 8,
1085 | 9,
1086 | 10,
1087 | 11,
1088 | 12,
1089 | 13,
1090 | 14,
1091 | 15
1092 | ],
1093 | "dark_oak_pressure_plate": [
1094 | 0,
1095 | 1,
1096 | 2,
1097 | 3,
1098 | 4,
1099 | 5,
1100 | 6,
1101 | 7,
1102 | 8,
1103 | 9,
1104 | 10,
1105 | 11,
1106 | 12,
1107 | 13,
1108 | 14,
1109 | 15
1110 | ],
1111 | "dark_oak_stairs": [
1112 | 0,
1113 | 1,
1114 | 2,
1115 | 3,
1116 | 4,
1117 | 5,
1118 | 6,
1119 | 7
1120 | ],
1121 | "dark_oak_trapdoor": [
1122 | 0,
1123 | 1,
1124 | 2,
1125 | 3,
1126 | 4,
1127 | 5,
1128 | 6,
1129 | 7,
1130 | 8,
1131 | 9,
1132 | 10,
1133 | 11,
1134 | 12,
1135 | 13,
1136 | 14,
1137 | 15
1138 | ],
1139 | "dark_prismarine_stairs": [
1140 | 0,
1141 | 1,
1142 | 2,
1143 | 3,
1144 | 4,
1145 | 5,
1146 | 6,
1147 | 7
1148 | ],
1149 | "darkoak_standing_sign": [
1150 | 0,
1151 | 1,
1152 | 2,
1153 | 3,
1154 | 4,
1155 | 5,
1156 | 6,
1157 | 7,
1158 | 8,
1159 | 9,
1160 | 10,
1161 | 11,
1162 | 12,
1163 | 13,
1164 | 14,
1165 | 15
1166 | ],
1167 | "darkoak_wall_sign": [
1168 | 0,
1169 | 1,
1170 | 2,
1171 | 3,
1172 | 4,
1173 | 5,
1174 | 6,
1175 | 7
1176 | ],
1177 | "daylight_detector": [
1178 | 0,
1179 | 1,
1180 | 2,
1181 | 3,
1182 | 4,
1183 | 5,
1184 | 6,
1185 | 7,
1186 | 8,
1187 | 9,
1188 | 10,
1189 | 11,
1190 | 12,
1191 | 13,
1192 | 14,
1193 | 15
1194 | ],
1195 | "daylight_detector_inverted": [
1196 | 0,
1197 | 1,
1198 | 2,
1199 | 3,
1200 | 4,
1201 | 5,
1202 | 6,
1203 | 7,
1204 | 8,
1205 | 9,
1206 | 10,
1207 | 11,
1208 | 12,
1209 | 13,
1210 | 14,
1211 | 15
1212 | ],
1213 | "deadbush": [
1214 | 0
1215 | ],
1216 | "detector_rail": [
1217 | 0,
1218 | 1,
1219 | 2,
1220 | 3,
1221 | 4,
1222 | 5,
1223 | 6,
1224 | 7,
1225 | 8,
1226 | 9,
1227 | 10,
1228 | 11,
1229 | 12,
1230 | 13,
1231 | 14,
1232 | 15
1233 | ],
1234 | "diamond_block": [
1235 | 0
1236 | ],
1237 | "diamond_ore": [
1238 | 0
1239 | ],
1240 | "diorite_stairs": [
1241 | 0,
1242 | 1,
1243 | 2,
1244 | 3,
1245 | 4,
1246 | 5,
1247 | 6,
1248 | 7
1249 | ],
1250 | "dirt": [
1251 | 0,
1252 | 1
1253 | ],
1254 | "dispenser": [
1255 | 0,
1256 | 1,
1257 | 2,
1258 | 3,
1259 | 4,
1260 | 5,
1261 | 6,
1262 | 7,
1263 | 8,
1264 | 9,
1265 | 10,
1266 | 11,
1267 | 12,
1268 | 13,
1269 | 14,
1270 | 15
1271 | ],
1272 | "double_plant": [
1273 | 0,
1274 | 1,
1275 | 2,
1276 | 3,
1277 | 4,
1278 | 5,
1279 | 6,
1280 | 7,
1281 | 8,
1282 | 9,
1283 | 10,
1284 | 11,
1285 | 12,
1286 | 13,
1287 | 14,
1288 | 15
1289 | ],
1290 | "double_stone_slab": [
1291 | 0,
1292 | 1,
1293 | 2,
1294 | 3,
1295 | 4,
1296 | 5,
1297 | 6,
1298 | 7,
1299 | 8,
1300 | 9,
1301 | 10,
1302 | 11,
1303 | 12,
1304 | 13,
1305 | 14,
1306 | 15
1307 | ],
1308 | "double_stone_slab2": [
1309 | 0,
1310 | 1,
1311 | 2,
1312 | 3,
1313 | 4,
1314 | 5,
1315 | 6,
1316 | 7,
1317 | 8,
1318 | 9,
1319 | 10,
1320 | 11,
1321 | 12,
1322 | 13,
1323 | 14,
1324 | 15
1325 | ],
1326 | "double_stone_slab3": [
1327 | 0,
1328 | 1,
1329 | 2,
1330 | 3,
1331 | 4,
1332 | 5,
1333 | 6,
1334 | 7,
1335 | 8,
1336 | 9,
1337 | 10,
1338 | 11,
1339 | 12,
1340 | 13,
1341 | 14,
1342 | 15
1343 | ],
1344 | "double_stone_slab4": [
1345 | 0,
1346 | 1,
1347 | 2,
1348 | 3,
1349 | 4,
1350 | 5,
1351 | 6,
1352 | 7,
1353 | 8,
1354 | 9,
1355 | 10,
1356 | 11,
1357 | 12,
1358 | 13,
1359 | 14,
1360 | 15
1361 | ],
1362 | "double_wooden_slab": [
1363 | 0,
1364 | 1,
1365 | 2,
1366 | 3,
1367 | 4,
1368 | 5,
1369 | 6,
1370 | 7,
1371 | 8,
1372 | 9,
1373 | 10,
1374 | 11,
1375 | 12,
1376 | 13,
1377 | 14,
1378 | 15
1379 | ],
1380 | "dragon_egg": [
1381 | 0
1382 | ],
1383 | "dried_kelp_block": [
1384 | 0
1385 | ],
1386 | "dropper": [
1387 | 0,
1388 | 1,
1389 | 2,
1390 | 3,
1391 | 4,
1392 | 5,
1393 | 6,
1394 | 7,
1395 | 8,
1396 | 9,
1397 | 10,
1398 | 11,
1399 | 12,
1400 | 13,
1401 | 14,
1402 | 15
1403 | ],
1404 | "element_0": [
1405 | 0
1406 | ],
1407 | "element_1": [
1408 | 0
1409 | ],
1410 | "element_10": [
1411 | 0
1412 | ],
1413 | "element_100": [
1414 | 0
1415 | ],
1416 | "element_101": [
1417 | 0
1418 | ],
1419 | "element_102": [
1420 | 0
1421 | ],
1422 | "element_103": [
1423 | 0
1424 | ],
1425 | "element_104": [
1426 | 0
1427 | ],
1428 | "element_105": [
1429 | 0
1430 | ],
1431 | "element_106": [
1432 | 0
1433 | ],
1434 | "element_107": [
1435 | 0
1436 | ],
1437 | "element_108": [
1438 | 0
1439 | ],
1440 | "element_109": [
1441 | 0
1442 | ],
1443 | "element_11": [
1444 | 0
1445 | ],
1446 | "element_110": [
1447 | 0
1448 | ],
1449 | "element_111": [
1450 | 0
1451 | ],
1452 | "element_112": [
1453 | 0
1454 | ],
1455 | "element_113": [
1456 | 0
1457 | ],
1458 | "element_114": [
1459 | 0
1460 | ],
1461 | "element_115": [
1462 | 0
1463 | ],
1464 | "element_116": [
1465 | 0
1466 | ],
1467 | "element_117": [
1468 | 0
1469 | ],
1470 | "element_118": [
1471 | 0
1472 | ],
1473 | "element_12": [
1474 | 0
1475 | ],
1476 | "element_13": [
1477 | 0
1478 | ],
1479 | "element_14": [
1480 | 0
1481 | ],
1482 | "element_15": [
1483 | 0
1484 | ],
1485 | "element_16": [
1486 | 0
1487 | ],
1488 | "element_17": [
1489 | 0
1490 | ],
1491 | "element_18": [
1492 | 0
1493 | ],
1494 | "element_19": [
1495 | 0
1496 | ],
1497 | "element_2": [
1498 | 0
1499 | ],
1500 | "element_20": [
1501 | 0
1502 | ],
1503 | "element_21": [
1504 | 0
1505 | ],
1506 | "element_22": [
1507 | 0
1508 | ],
1509 | "element_23": [
1510 | 0
1511 | ],
1512 | "element_24": [
1513 | 0
1514 | ],
1515 | "element_25": [
1516 | 0
1517 | ],
1518 | "element_26": [
1519 | 0
1520 | ],
1521 | "element_27": [
1522 | 0
1523 | ],
1524 | "element_28": [
1525 | 0
1526 | ],
1527 | "element_29": [
1528 | 0
1529 | ],
1530 | "element_3": [
1531 | 0
1532 | ],
1533 | "element_30": [
1534 | 0
1535 | ],
1536 | "element_31": [
1537 | 0
1538 | ],
1539 | "element_32": [
1540 | 0
1541 | ],
1542 | "element_33": [
1543 | 0
1544 | ],
1545 | "element_34": [
1546 | 0
1547 | ],
1548 | "element_35": [
1549 | 0
1550 | ],
1551 | "element_36": [
1552 | 0
1553 | ],
1554 | "element_37": [
1555 | 0
1556 | ],
1557 | "element_38": [
1558 | 0
1559 | ],
1560 | "element_39": [
1561 | 0
1562 | ],
1563 | "element_4": [
1564 | 0
1565 | ],
1566 | "element_40": [
1567 | 0
1568 | ],
1569 | "element_41": [
1570 | 0
1571 | ],
1572 | "element_42": [
1573 | 0
1574 | ],
1575 | "element_43": [
1576 | 0
1577 | ],
1578 | "element_44": [
1579 | 0
1580 | ],
1581 | "element_45": [
1582 | 0
1583 | ],
1584 | "element_46": [
1585 | 0
1586 | ],
1587 | "element_47": [
1588 | 0
1589 | ],
1590 | "element_48": [
1591 | 0
1592 | ],
1593 | "element_49": [
1594 | 0
1595 | ],
1596 | "element_5": [
1597 | 0
1598 | ],
1599 | "element_50": [
1600 | 0
1601 | ],
1602 | "element_51": [
1603 | 0
1604 | ],
1605 | "element_52": [
1606 | 0
1607 | ],
1608 | "element_53": [
1609 | 0
1610 | ],
1611 | "element_54": [
1612 | 0
1613 | ],
1614 | "element_55": [
1615 | 0
1616 | ],
1617 | "element_56": [
1618 | 0
1619 | ],
1620 | "element_57": [
1621 | 0
1622 | ],
1623 | "element_58": [
1624 | 0
1625 | ],
1626 | "element_59": [
1627 | 0
1628 | ],
1629 | "element_6": [
1630 | 0
1631 | ],
1632 | "element_60": [
1633 | 0
1634 | ],
1635 | "element_61": [
1636 | 0
1637 | ],
1638 | "element_62": [
1639 | 0
1640 | ],
1641 | "element_63": [
1642 | 0
1643 | ],
1644 | "element_64": [
1645 | 0
1646 | ],
1647 | "element_65": [
1648 | 0
1649 | ],
1650 | "element_66": [
1651 | 0
1652 | ],
1653 | "element_67": [
1654 | 0
1655 | ],
1656 | "element_68": [
1657 | 0
1658 | ],
1659 | "element_69": [
1660 | 0
1661 | ],
1662 | "element_7": [
1663 | 0
1664 | ],
1665 | "element_70": [
1666 | 0
1667 | ],
1668 | "element_71": [
1669 | 0
1670 | ],
1671 | "element_72": [
1672 | 0
1673 | ],
1674 | "element_73": [
1675 | 0
1676 | ],
1677 | "element_74": [
1678 | 0
1679 | ],
1680 | "element_75": [
1681 | 0
1682 | ],
1683 | "element_76": [
1684 | 0
1685 | ],
1686 | "element_77": [
1687 | 0
1688 | ],
1689 | "element_78": [
1690 | 0
1691 | ],
1692 | "element_79": [
1693 | 0
1694 | ],
1695 | "element_8": [
1696 | 0
1697 | ],
1698 | "element_80": [
1699 | 0
1700 | ],
1701 | "element_81": [
1702 | 0
1703 | ],
1704 | "element_82": [
1705 | 0
1706 | ],
1707 | "element_83": [
1708 | 0
1709 | ],
1710 | "element_84": [
1711 | 0
1712 | ],
1713 | "element_85": [
1714 | 0
1715 | ],
1716 | "element_86": [
1717 | 0
1718 | ],
1719 | "element_87": [
1720 | 0
1721 | ],
1722 | "element_88": [
1723 | 0
1724 | ],
1725 | "element_89": [
1726 | 0
1727 | ],
1728 | "element_9": [
1729 | 0
1730 | ],
1731 | "element_90": [
1732 | 0
1733 | ],
1734 | "element_91": [
1735 | 0
1736 | ],
1737 | "element_92": [
1738 | 0
1739 | ],
1740 | "element_93": [
1741 | 0
1742 | ],
1743 | "element_94": [
1744 | 0
1745 | ],
1746 | "element_95": [
1747 | 0
1748 | ],
1749 | "element_96": [
1750 | 0
1751 | ],
1752 | "element_97": [
1753 | 0
1754 | ],
1755 | "element_98": [
1756 | 0
1757 | ],
1758 | "element_99": [
1759 | 0
1760 | ],
1761 | "emerald_block": [
1762 | 0
1763 | ],
1764 | "emerald_ore": [
1765 | 0
1766 | ],
1767 | "enchanting_table": [
1768 | 0
1769 | ],
1770 | "end_brick_stairs": [
1771 | 0,
1772 | 1,
1773 | 2,
1774 | 3,
1775 | 4,
1776 | 5,
1777 | 6,
1778 | 7
1779 | ],
1780 | "end_bricks": [
1781 | 0
1782 | ],
1783 | "end_gateway": [
1784 | 0
1785 | ],
1786 | "end_portal": [
1787 | 0
1788 | ],
1789 | "end_portal_frame": [
1790 | 0,
1791 | 1,
1792 | 2,
1793 | 3,
1794 | 4,
1795 | 5,
1796 | 6,
1797 | 7
1798 | ],
1799 | "end_rod": [
1800 | 0,
1801 | 1,
1802 | 2,
1803 | 3,
1804 | 4,
1805 | 5,
1806 | 6,
1807 | 7
1808 | ],
1809 | "end_stone": [
1810 | 0
1811 | ],
1812 | "ender_chest": [
1813 | 0,
1814 | 1,
1815 | 2,
1816 | 3,
1817 | 4,
1818 | 5,
1819 | 6,
1820 | 7
1821 | ],
1822 | "farmland": [
1823 | 0,
1824 | 1,
1825 | 2,
1826 | 3,
1827 | 4,
1828 | 5,
1829 | 6,
1830 | 7
1831 | ],
1832 | "fence": [
1833 | 0,
1834 | 1,
1835 | 2,
1836 | 3,
1837 | 4,
1838 | 5,
1839 | 6,
1840 | 7
1841 | ],
1842 | "fence_gate": [
1843 | 0,
1844 | 1,
1845 | 2,
1846 | 3,
1847 | 4,
1848 | 5,
1849 | 6,
1850 | 7,
1851 | 8,
1852 | 9,
1853 | 10,
1854 | 11,
1855 | 12,
1856 | 13,
1857 | 14,
1858 | 15
1859 | ],
1860 | "fire": [
1861 | 0,
1862 | 1,
1863 | 2,
1864 | 3,
1865 | 4,
1866 | 5,
1867 | 6,
1868 | 7,
1869 | 8,
1870 | 9,
1871 | 10,
1872 | 11,
1873 | 12,
1874 | 13,
1875 | 14,
1876 | 15
1877 | ],
1878 | "fletching_table": [
1879 | 0
1880 | ],
1881 | "flower_pot": [
1882 | 0,
1883 | 1
1884 | ],
1885 | "flowing_lava": [
1886 | 0,
1887 | 1,
1888 | 2,
1889 | 3,
1890 | 4,
1891 | 5,
1892 | 6,
1893 | 7,
1894 | 8,
1895 | 9,
1896 | 10,
1897 | 11,
1898 | 12,
1899 | 13,
1900 | 14,
1901 | 15
1902 | ],
1903 | "flowing_water": [
1904 | 0,
1905 | 1,
1906 | 2,
1907 | 3,
1908 | 4,
1909 | 5,
1910 | 6,
1911 | 7,
1912 | 8,
1913 | 9,
1914 | 10,
1915 | 11,
1916 | 12,
1917 | 13,
1918 | 14,
1919 | 15
1920 | ],
1921 | "frame": [
1922 | 0,
1923 | 1,
1924 | 2,
1925 | 3,
1926 | 4,
1927 | 5,
1928 | 6,
1929 | 7
1930 | ],
1931 | "frosted_ice": [
1932 | 0,
1933 | 1,
1934 | 2,
1935 | 3
1936 | ],
1937 | "furnace": [
1938 | 0,
1939 | 1,
1940 | 2,
1941 | 3,
1942 | 4,
1943 | 5,
1944 | 6,
1945 | 7
1946 | ],
1947 | "glass": [
1948 | 0
1949 | ],
1950 | "glass_pane": [
1951 | 0
1952 | ],
1953 | "glowingobsidian": [
1954 | 0
1955 | ],
1956 | "glowstone": [
1957 | 0
1958 | ],
1959 | "gold_block": [
1960 | 0
1961 | ],
1962 | "gold_ore": [
1963 | 0
1964 | ],
1965 | "golden_rail": [
1966 | 0,
1967 | 1,
1968 | 2,
1969 | 3,
1970 | 4,
1971 | 5,
1972 | 6,
1973 | 7,
1974 | 8,
1975 | 9,
1976 | 10,
1977 | 11,
1978 | 12,
1979 | 13,
1980 | 14,
1981 | 15
1982 | ],
1983 | "granite_stairs": [
1984 | 0,
1985 | 1,
1986 | 2,
1987 | 3,
1988 | 4,
1989 | 5,
1990 | 6,
1991 | 7
1992 | ],
1993 | "grass": [
1994 | 0
1995 | ],
1996 | "grass_path": [
1997 | 0
1998 | ],
1999 | "gravel": [
2000 | 0
2001 | ],
2002 | "gray_glazed_terracotta": [
2003 | 0,
2004 | 1,
2005 | 2,
2006 | 3,
2007 | 4,
2008 | 5,
2009 | 6,
2010 | 7
2011 | ],
2012 | "green_glazed_terracotta": [
2013 | 0,
2014 | 1,
2015 | 2,
2016 | 3,
2017 | 4,
2018 | 5,
2019 | 6,
2020 | 7
2021 | ],
2022 | "grindstone": [
2023 | 0,
2024 | 1,
2025 | 2,
2026 | 3,
2027 | 4,
2028 | 5,
2029 | 6,
2030 | 7,
2031 | 8,
2032 | 9,
2033 | 10,
2034 | 11,
2035 | 12,
2036 | 13,
2037 | 14,
2038 | 15
2039 | ],
2040 | "hard_glass": [
2041 | 0
2042 | ],
2043 | "hard_glass_pane": [
2044 | 0
2045 | ],
2046 | "hard_stained_glass": [
2047 | 0,
2048 | 1,
2049 | 2,
2050 | 3,
2051 | 4,
2052 | 5,
2053 | 6,
2054 | 7,
2055 | 8,
2056 | 9,
2057 | 10,
2058 | 11,
2059 | 12,
2060 | 13,
2061 | 14,
2062 | 15
2063 | ],
2064 | "hard_stained_glass_pane": [
2065 | 0,
2066 | 1,
2067 | 2,
2068 | 3,
2069 | 4,
2070 | 5,
2071 | 6,
2072 | 7,
2073 | 8,
2074 | 9,
2075 | 10,
2076 | 11,
2077 | 12,
2078 | 13,
2079 | 14,
2080 | 15
2081 | ],
2082 | "hardened_clay": [
2083 | 0
2084 | ],
2085 | "hay_block": [
2086 | 0,
2087 | 1,
2088 | 2,
2089 | 3,
2090 | 4,
2091 | 5,
2092 | 6,
2093 | 7,
2094 | 8,
2095 | 9,
2096 | 10,
2097 | 11,
2098 | 12,
2099 | 13,
2100 | 14,
2101 | 15
2102 | ],
2103 | "heavy_weighted_pressure_plate": [
2104 | 0,
2105 | 1,
2106 | 2,
2107 | 3,
2108 | 4,
2109 | 5,
2110 | 6,
2111 | 7,
2112 | 8,
2113 | 9,
2114 | 10,
2115 | 11,
2116 | 12,
2117 | 13,
2118 | 14,
2119 | 15
2120 | ],
2121 | "hopper": [
2122 | 0,
2123 | 1,
2124 | 2,
2125 | 3,
2126 | 4,
2127 | 5,
2128 | 6,
2129 | 7,
2130 | 8,
2131 | 9,
2132 | 10,
2133 | 11,
2134 | 12,
2135 | 13,
2136 | 14,
2137 | 15
2138 | ],
2139 | "ice": [
2140 | 0
2141 | ],
2142 | "info_update": [
2143 | 0
2144 | ],
2145 | "info_update2": [
2146 | 0
2147 | ],
2148 | "invisibleBedrock": [
2149 | 0
2150 | ],
2151 | "iron_bars": [
2152 | 0
2153 | ],
2154 | "iron_block": [
2155 | 0
2156 | ],
2157 | "iron_door": [
2158 | 0,
2159 | 1,
2160 | 2,
2161 | 3,
2162 | 4,
2163 | 5,
2164 | 6,
2165 | 7,
2166 | 8,
2167 | 9,
2168 | 10,
2169 | 11,
2170 | 12,
2171 | 13,
2172 | 14,
2173 | 15,
2174 | 16,
2175 | 17,
2176 | 18,
2177 | 19,
2178 | 20,
2179 | 21,
2180 | 22,
2181 | 23,
2182 | 24,
2183 | 25,
2184 | 26,
2185 | 27,
2186 | 28,
2187 | 29,
2188 | 30,
2189 | 31
2190 | ],
2191 | "iron_ore": [
2192 | 0
2193 | ],
2194 | "iron_trapdoor": [
2195 | 0,
2196 | 1,
2197 | 2,
2198 | 3,
2199 | 4,
2200 | 5,
2201 | 6,
2202 | 7,
2203 | 8,
2204 | 9,
2205 | 10,
2206 | 11,
2207 | 12,
2208 | 13,
2209 | 14,
2210 | 15
2211 | ],
2212 | "jigsaw": [
2213 | 0,
2214 | 1,
2215 | 2,
2216 | 3,
2217 | 4,
2218 | 5,
2219 | 6,
2220 | 7
2221 | ],
2222 | "jukebox": [
2223 | 0
2224 | ],
2225 | "jungle_button": [
2226 | 0,
2227 | 1,
2228 | 2,
2229 | 3,
2230 | 4,
2231 | 5,
2232 | 6,
2233 | 7,
2234 | 8,
2235 | 9,
2236 | 10,
2237 | 11,
2238 | 12,
2239 | 13,
2240 | 14,
2241 | 15
2242 | ],
2243 | "jungle_door": [
2244 | 0,
2245 | 1,
2246 | 2,
2247 | 3,
2248 | 4,
2249 | 5,
2250 | 6,
2251 | 7,
2252 | 8,
2253 | 9,
2254 | 10,
2255 | 11,
2256 | 12,
2257 | 13,
2258 | 14,
2259 | 15,
2260 | 16,
2261 | 17,
2262 | 18,
2263 | 19,
2264 | 20,
2265 | 21,
2266 | 22,
2267 | 23,
2268 | 24,
2269 | 25,
2270 | 26,
2271 | 27,
2272 | 28,
2273 | 29,
2274 | 30,
2275 | 31
2276 | ],
2277 | "jungle_fence_gate": [
2278 | 0,
2279 | 1,
2280 | 2,
2281 | 3,
2282 | 4,
2283 | 5,
2284 | 6,
2285 | 7,
2286 | 8,
2287 | 9,
2288 | 10,
2289 | 11,
2290 | 12,
2291 | 13,
2292 | 14,
2293 | 15
2294 | ],
2295 | "jungle_pressure_plate": [
2296 | 0,
2297 | 1,
2298 | 2,
2299 | 3,
2300 | 4,
2301 | 5,
2302 | 6,
2303 | 7,
2304 | 8,
2305 | 9,
2306 | 10,
2307 | 11,
2308 | 12,
2309 | 13,
2310 | 14,
2311 | 15
2312 | ],
2313 | "jungle_stairs": [
2314 | 0,
2315 | 1,
2316 | 2,
2317 | 3,
2318 | 4,
2319 | 5,
2320 | 6,
2321 | 7
2322 | ],
2323 | "jungle_standing_sign": [
2324 | 0,
2325 | 1,
2326 | 2,
2327 | 3,
2328 | 4,
2329 | 5,
2330 | 6,
2331 | 7,
2332 | 8,
2333 | 9,
2334 | 10,
2335 | 11,
2336 | 12,
2337 | 13,
2338 | 14,
2339 | 15
2340 | ],
2341 | "jungle_trapdoor": [
2342 | 0,
2343 | 1,
2344 | 2,
2345 | 3,
2346 | 4,
2347 | 5,
2348 | 6,
2349 | 7,
2350 | 8,
2351 | 9,
2352 | 10,
2353 | 11,
2354 | 12,
2355 | 13,
2356 | 14,
2357 | 15
2358 | ],
2359 | "jungle_wall_sign": [
2360 | 0,
2361 | 1,
2362 | 2,
2363 | 3,
2364 | 4,
2365 | 5,
2366 | 6,
2367 | 7
2368 | ],
2369 | "kelp": [
2370 | 0,
2371 | 1,
2372 | 2,
2373 | 3,
2374 | 4,
2375 | 5,
2376 | 6,
2377 | 7,
2378 | 8,
2379 | 9,
2380 | 10,
2381 | 11,
2382 | 12,
2383 | 13,
2384 | 14,
2385 | 15
2386 | ],
2387 | "ladder": [
2388 | 0,
2389 | 1,
2390 | 2,
2391 | 3,
2392 | 4,
2393 | 5,
2394 | 6,
2395 | 7
2396 | ],
2397 | "lantern": [
2398 | 0,
2399 | 1
2400 | ],
2401 | "lapis_block": [
2402 | 0
2403 | ],
2404 | "lapis_ore": [
2405 | 0
2406 | ],
2407 | "lava": [
2408 | 0,
2409 | 1,
2410 | 2,
2411 | 3,
2412 | 4,
2413 | 5,
2414 | 6,
2415 | 7,
2416 | 8,
2417 | 9,
2418 | 10,
2419 | 11,
2420 | 12,
2421 | 13,
2422 | 14,
2423 | 15
2424 | ],
2425 | "lava_cauldron": [
2426 | 0,
2427 | 1,
2428 | 2,
2429 | 3,
2430 | 4,
2431 | 5,
2432 | 6,
2433 | 7,
2434 | 8,
2435 | 9,
2436 | 10,
2437 | 11,
2438 | 12,
2439 | 13,
2440 | 14,
2441 | 15
2442 | ],
2443 | "leaves": [
2444 | 0,
2445 | 1,
2446 | 2,
2447 | 3,
2448 | 4,
2449 | 5,
2450 | 6,
2451 | 7,
2452 | 8,
2453 | 9,
2454 | 10,
2455 | 11,
2456 | 12,
2457 | 13,
2458 | 14,
2459 | 15
2460 | ],
2461 | "leaves2": [
2462 | 0,
2463 | 1,
2464 | 2,
2465 | 3,
2466 | 4,
2467 | 5,
2468 | 6,
2469 | 7,
2470 | 8,
2471 | 9,
2472 | 10,
2473 | 11,
2474 | 12,
2475 | 13,
2476 | 14,
2477 | 15
2478 | ],
2479 | "lectern": [
2480 | 0,
2481 | 1,
2482 | 2,
2483 | 3,
2484 | 4,
2485 | 5,
2486 | 6,
2487 | 7
2488 | ],
2489 | "lever": [
2490 | 0,
2491 | 1,
2492 | 2,
2493 | 3,
2494 | 4,
2495 | 5,
2496 | 6,
2497 | 7,
2498 | 8,
2499 | 9,
2500 | 10,
2501 | 11,
2502 | 12,
2503 | 13,
2504 | 14,
2505 | 15
2506 | ],
2507 | "light_blue_glazed_terracotta": [
2508 | 0,
2509 | 1,
2510 | 2,
2511 | 3,
2512 | 4,
2513 | 5,
2514 | 6,
2515 | 7
2516 | ],
2517 | "light_weighted_pressure_plate": [
2518 | 0,
2519 | 1,
2520 | 2,
2521 | 3,
2522 | 4,
2523 | 5,
2524 | 6,
2525 | 7,
2526 | 8,
2527 | 9,
2528 | 10,
2529 | 11,
2530 | 12,
2531 | 13,
2532 | 14,
2533 | 15
2534 | ],
2535 | "lime_glazed_terracotta": [
2536 | 0,
2537 | 1,
2538 | 2,
2539 | 3,
2540 | 4,
2541 | 5,
2542 | 6,
2543 | 7
2544 | ],
2545 | "lit_blast_furnace": [
2546 | 0,
2547 | 1,
2548 | 2,
2549 | 3,
2550 | 4,
2551 | 5,
2552 | 6,
2553 | 7
2554 | ],
2555 | "lit_furnace": [
2556 | 0,
2557 | 1,
2558 | 2,
2559 | 3,
2560 | 4,
2561 | 5,
2562 | 6,
2563 | 7
2564 | ],
2565 | "lit_pumpkin": [
2566 | 0,
2567 | 1,
2568 | 2,
2569 | 3
2570 | ],
2571 | "lit_redstone_lamp": [
2572 | 0
2573 | ],
2574 | "lit_redstone_ore": [
2575 | 0
2576 | ],
2577 | "lit_smoker": [
2578 | 0,
2579 | 1,
2580 | 2,
2581 | 3,
2582 | 4,
2583 | 5,
2584 | 6,
2585 | 7
2586 | ],
2587 | "log": [
2588 | 0,
2589 | 1,
2590 | 2,
2591 | 3,
2592 | 4,
2593 | 5,
2594 | 6,
2595 | 7,
2596 | 8,
2597 | 9,
2598 | 10,
2599 | 11,
2600 | 12,
2601 | 13,
2602 | 14,
2603 | 15
2604 | ],
2605 | "log2": [
2606 | 0,
2607 | 1,
2608 | 2,
2609 | 3,
2610 | 4,
2611 | 5,
2612 | 6,
2613 | 7,
2614 | 8,
2615 | 9,
2616 | 10,
2617 | 11,
2618 | 12,
2619 | 13,
2620 | 14,
2621 | 15
2622 | ],
2623 | "loom": [
2624 | 0,
2625 | 1,
2626 | 2,
2627 | 3
2628 | ],
2629 | "magenta_glazed_terracotta": [
2630 | 0,
2631 | 1,
2632 | 2,
2633 | 3,
2634 | 4,
2635 | 5,
2636 | 6,
2637 | 7
2638 | ],
2639 | "magma": [
2640 | 0
2641 | ],
2642 | "melon_block": [
2643 | 0
2644 | ],
2645 | "melon_stem": [
2646 | 0,
2647 | 1,
2648 | 2,
2649 | 3,
2650 | 4,
2651 | 5,
2652 | 6,
2653 | 7
2654 | ],
2655 | "mob_spawner": [
2656 | 0
2657 | ],
2658 | "monster_egg": [
2659 | 0,
2660 | 1,
2661 | 2,
2662 | 3,
2663 | 4,
2664 | 5,
2665 | 6,
2666 | 7
2667 | ],
2668 | "mossy_cobblestone": [
2669 | 0
2670 | ],
2671 | "mossy_cobblestone_stairs": [
2672 | 0,
2673 | 1,
2674 | 2,
2675 | 3,
2676 | 4,
2677 | 5,
2678 | 6,
2679 | 7
2680 | ],
2681 | "mossy_stone_brick_stairs": [
2682 | 0,
2683 | 1,
2684 | 2,
2685 | 3,
2686 | 4,
2687 | 5,
2688 | 6,
2689 | 7
2690 | ],
2691 | "movingBlock": [
2692 | 0
2693 | ],
2694 | "mycelium": [
2695 | 0
2696 | ],
2697 | "nether_brick": [
2698 | 0
2699 | ],
2700 | "nether_brick_fence": [
2701 | 0
2702 | ],
2703 | "nether_brick_stairs": [
2704 | 0,
2705 | 1,
2706 | 2,
2707 | 3,
2708 | 4,
2709 | 5,
2710 | 6,
2711 | 7
2712 | ],
2713 | "nether_wart": [
2714 | 0,
2715 | 1,
2716 | 2,
2717 | 3
2718 | ],
2719 | "nether_wart_block": [
2720 | 0
2721 | ],
2722 | "netherrack": [
2723 | 0
2724 | ],
2725 | "netherreactor": [
2726 | 0
2727 | ],
2728 | "normal_stone_stairs": [
2729 | 0,
2730 | 1,
2731 | 2,
2732 | 3,
2733 | 4,
2734 | 5,
2735 | 6,
2736 | 7
2737 | ],
2738 | "noteblock": [
2739 | 0
2740 | ],
2741 | "oak_stairs": [
2742 | 0,
2743 | 1,
2744 | 2,
2745 | 3,
2746 | 4,
2747 | 5,
2748 | 6,
2749 | 7
2750 | ],
2751 | "observer": [
2752 | 0,
2753 | 1,
2754 | 2,
2755 | 3,
2756 | 4,
2757 | 5,
2758 | 6,
2759 | 7,
2760 | 8,
2761 | 9,
2762 | 10,
2763 | 11,
2764 | 12,
2765 | 13,
2766 | 14,
2767 | 15
2768 | ],
2769 | "obsidian": [
2770 | 0
2771 | ],
2772 | "orange_glazed_terracotta": [
2773 | 0,
2774 | 1,
2775 | 2,
2776 | 3,
2777 | 4,
2778 | 5,
2779 | 6,
2780 | 7
2781 | ],
2782 | "packed_ice": [
2783 | 0
2784 | ],
2785 | "pink_glazed_terracotta": [
2786 | 0,
2787 | 1,
2788 | 2,
2789 | 3,
2790 | 4,
2791 | 5,
2792 | 6,
2793 | 7
2794 | ],
2795 | "piston": [
2796 | 0,
2797 | 1,
2798 | 2,
2799 | 3,
2800 | 4,
2801 | 5,
2802 | 6,
2803 | 7
2804 | ],
2805 | "pistonArmCollision": [
2806 | 0,
2807 | 1,
2808 | 2,
2809 | 3,
2810 | 4,
2811 | 5,
2812 | 6,
2813 | 7
2814 | ],
2815 | "planks": [
2816 | 0,
2817 | 1,
2818 | 2,
2819 | 3,
2820 | 4,
2821 | 5,
2822 | 6,
2823 | 7
2824 | ],
2825 | "podzol": [
2826 | 0
2827 | ],
2828 | "polished_andesite_stairs": [
2829 | 0,
2830 | 1,
2831 | 2,
2832 | 3,
2833 | 4,
2834 | 5,
2835 | 6,
2836 | 7
2837 | ],
2838 | "polished_diorite_stairs": [
2839 | 0,
2840 | 1,
2841 | 2,
2842 | 3,
2843 | 4,
2844 | 5,
2845 | 6,
2846 | 7
2847 | ],
2848 | "polished_granite_stairs": [
2849 | 0,
2850 | 1,
2851 | 2,
2852 | 3,
2853 | 4,
2854 | 5,
2855 | 6,
2856 | 7
2857 | ],
2858 | "portal": [
2859 | 0,
2860 | 1,
2861 | 2,
2862 | 3
2863 | ],
2864 | "potatoes": [
2865 | 0,
2866 | 1,
2867 | 2,
2868 | 3,
2869 | 4,
2870 | 5,
2871 | 6,
2872 | 7
2873 | ],
2874 | "powered_comparator": [
2875 | 0,
2876 | 1,
2877 | 2,
2878 | 3,
2879 | 4,
2880 | 5,
2881 | 6,
2882 | 7,
2883 | 8,
2884 | 9,
2885 | 10,
2886 | 11,
2887 | 12,
2888 | 13,
2889 | 14,
2890 | 15
2891 | ],
2892 | "powered_repeater": [
2893 | 0,
2894 | 1,
2895 | 2,
2896 | 3,
2897 | 4,
2898 | 5,
2899 | 6,
2900 | 7,
2901 | 8,
2902 | 9,
2903 | 10,
2904 | 11,
2905 | 12,
2906 | 13,
2907 | 14,
2908 | 15
2909 | ],
2910 | "prismarine": [
2911 | 0,
2912 | 1,
2913 | 2,
2914 | 3
2915 | ],
2916 | "prismarine_bricks_stairs": [
2917 | 0,
2918 | 1,
2919 | 2,
2920 | 3,
2921 | 4,
2922 | 5,
2923 | 6,
2924 | 7
2925 | ],
2926 | "prismarine_stairs": [
2927 | 0,
2928 | 1,
2929 | 2,
2930 | 3,
2931 | 4,
2932 | 5,
2933 | 6,
2934 | 7
2935 | ],
2936 | "pumpkin": [
2937 | 0,
2938 | 1,
2939 | 2,
2940 | 3
2941 | ],
2942 | "pumpkin_stem": [
2943 | 0,
2944 | 1,
2945 | 2,
2946 | 3,
2947 | 4,
2948 | 5,
2949 | 6,
2950 | 7
2951 | ],
2952 | "purple_glazed_terracotta": [
2953 | 0,
2954 | 1,
2955 | 2,
2956 | 3,
2957 | 4,
2958 | 5,
2959 | 6,
2960 | 7
2961 | ],
2962 | "purpur_block": [
2963 | 0,
2964 | 1,
2965 | 2,
2966 | 3,
2967 | 4,
2968 | 5,
2969 | 6,
2970 | 7,
2971 | 8,
2972 | 9,
2973 | 10,
2974 | 11,
2975 | 12,
2976 | 13,
2977 | 14,
2978 | 15
2979 | ],
2980 | "purpur_stairs": [
2981 | 0,
2982 | 1,
2983 | 2,
2984 | 3,
2985 | 4,
2986 | 5,
2987 | 6,
2988 | 7
2989 | ],
2990 | "quartz_block": [
2991 | 0,
2992 | 1,
2993 | 2,
2994 | 3,
2995 | 4,
2996 | 5,
2997 | 6,
2998 | 7,
2999 | 8,
3000 | 9,
3001 | 10,
3002 | 11,
3003 | 12,
3004 | 13,
3005 | 14,
3006 | 15
3007 | ],
3008 | "quartz_ore": [
3009 | 0
3010 | ],
3011 | "quartz_stairs": [
3012 | 0,
3013 | 1,
3014 | 2,
3015 | 3,
3016 | 4,
3017 | 5,
3018 | 6,
3019 | 7
3020 | ],
3021 | "rail": [
3022 | 0,
3023 | 1,
3024 | 2,
3025 | 3,
3026 | 4,
3027 | 5,
3028 | 6,
3029 | 7,
3030 | 8,
3031 | 9,
3032 | 10,
3033 | 11,
3034 | 12,
3035 | 13,
3036 | 14,
3037 | 15
3038 | ],
3039 | "red_flower": [
3040 | 0,
3041 | 1,
3042 | 2,
3043 | 3,
3044 | 4,
3045 | 5,
3046 | 6,
3047 | 7,
3048 | 8,
3049 | 9,
3050 | 10,
3051 | 11,
3052 | 12,
3053 | 13,
3054 | 14,
3055 | 15
3056 | ],
3057 | "red_glazed_terracotta": [
3058 | 0,
3059 | 1,
3060 | 2,
3061 | 3,
3062 | 4,
3063 | 5,
3064 | 6,
3065 | 7
3066 | ],
3067 | "red_mushroom": [
3068 | 0
3069 | ],
3070 | "red_mushroom_block": [
3071 | 0,
3072 | 1,
3073 | 2,
3074 | 3,
3075 | 4,
3076 | 5,
3077 | 6,
3078 | 7,
3079 | 8,
3080 | 9,
3081 | 10,
3082 | 11,
3083 | 12,
3084 | 13,
3085 | 14,
3086 | 15
3087 | ],
3088 | "red_nether_brick": [
3089 | 0
3090 | ],
3091 | "red_nether_brick_stairs": [
3092 | 0,
3093 | 1,
3094 | 2,
3095 | 3,
3096 | 4,
3097 | 5,
3098 | 6,
3099 | 7
3100 | ],
3101 | "red_sandstone": [
3102 | 0,
3103 | 1,
3104 | 2,
3105 | 3
3106 | ],
3107 | "red_sandstone_stairs": [
3108 | 0,
3109 | 1,
3110 | 2,
3111 | 3,
3112 | 4,
3113 | 5,
3114 | 6,
3115 | 7
3116 | ],
3117 | "redstone_block": [
3118 | 0
3119 | ],
3120 | "redstone_lamp": [
3121 | 0
3122 | ],
3123 | "redstone_ore": [
3124 | 0
3125 | ],
3126 | "redstone_torch": [
3127 | 0,
3128 | 1,
3129 | 2,
3130 | 3,
3131 | 4,
3132 | 5,
3133 | 6,
3134 | 7
3135 | ],
3136 | "redstone_wire": [
3137 | 0,
3138 | 1,
3139 | 2,
3140 | 3,
3141 | 4,
3142 | 5,
3143 | 6,
3144 | 7,
3145 | 8,
3146 | 9,
3147 | 10,
3148 | 11,
3149 | 12,
3150 | 13,
3151 | 14,
3152 | 15
3153 | ],
3154 | "reeds": [
3155 | 0,
3156 | 1,
3157 | 2,
3158 | 3,
3159 | 4,
3160 | 5,
3161 | 6,
3162 | 7,
3163 | 8,
3164 | 9,
3165 | 10,
3166 | 11,
3167 | 12,
3168 | 13,
3169 | 14,
3170 | 15
3171 | ],
3172 | "repeating_command_block": [
3173 | 0,
3174 | 1,
3175 | 2,
3176 | 3,
3177 | 4,
3178 | 5,
3179 | 6,
3180 | 7,
3181 | 8,
3182 | 9,
3183 | 10,
3184 | 11,
3185 | 12,
3186 | 13,
3187 | 14,
3188 | 15
3189 | ],
3190 | "reserved6": [
3191 | 0
3192 | ],
3193 | "sand": [
3194 | 0,
3195 | 1
3196 | ],
3197 | "sandstone": [
3198 | 0,
3199 | 1,
3200 | 2,
3201 | 3
3202 | ],
3203 | "sandstone_stairs": [
3204 | 0,
3205 | 1,
3206 | 2,
3207 | 3,
3208 | 4,
3209 | 5,
3210 | 6,
3211 | 7
3212 | ],
3213 | "sapling": [
3214 | 0,
3215 | 1,
3216 | 2,
3217 | 3,
3218 | 4,
3219 | 5,
3220 | 6,
3221 | 7,
3222 | 8,
3223 | 9,
3224 | 10,
3225 | 11,
3226 | 12,
3227 | 13,
3228 | 14,
3229 | 15
3230 | ],
3231 | "scaffolding": [
3232 | 0,
3233 | 1,
3234 | 2,
3235 | 3,
3236 | 4,
3237 | 5,
3238 | 6,
3239 | 7,
3240 | 8,
3241 | 9,
3242 | 10,
3243 | 11,
3244 | 12,
3245 | 13,
3246 | 14,
3247 | 15
3248 | ],
3249 | "seaLantern": [
3250 | 0
3251 | ],
3252 | "sea_pickle": [
3253 | 0,
3254 | 1,
3255 | 2,
3256 | 3,
3257 | 4,
3258 | 5,
3259 | 6,
3260 | 7
3261 | ],
3262 | "seagrass": [
3263 | 0,
3264 | 1,
3265 | 2,
3266 | 3
3267 | ],
3268 | "shulker_box": [
3269 | 0,
3270 | 1,
3271 | 2,
3272 | 3,
3273 | 4,
3274 | 5,
3275 | 6,
3276 | 7,
3277 | 8,
3278 | 9,
3279 | 10,
3280 | 11,
3281 | 12,
3282 | 13,
3283 | 14,
3284 | 15
3285 | ],
3286 | "silver_glazed_terracotta": [
3287 | 0,
3288 | 1,
3289 | 2,
3290 | 3,
3291 | 4,
3292 | 5,
3293 | 6,
3294 | 7
3295 | ],
3296 | "skull": [
3297 | 0,
3298 | 1,
3299 | 2,
3300 | 3,
3301 | 4,
3302 | 5,
3303 | 6,
3304 | 7,
3305 | 8,
3306 | 9,
3307 | 10,
3308 | 11,
3309 | 12,
3310 | 13,
3311 | 14,
3312 | 15
3313 | ],
3314 | "slime": [
3315 | 0
3316 | ],
3317 | "smithing_table": [
3318 | 0
3319 | ],
3320 | "smoker": [
3321 | 0,
3322 | 1,
3323 | 2,
3324 | 3,
3325 | 4,
3326 | 5,
3327 | 6,
3328 | 7
3329 | ],
3330 | "smooth_quartz_stairs": [
3331 | 0,
3332 | 1,
3333 | 2,
3334 | 3,
3335 | 4,
3336 | 5,
3337 | 6,
3338 | 7
3339 | ],
3340 | "smooth_red_sandstone_stairs": [
3341 | 0,
3342 | 1,
3343 | 2,
3344 | 3,
3345 | 4,
3346 | 5,
3347 | 6,
3348 | 7
3349 | ],
3350 | "smooth_sandstone_stairs": [
3351 | 0,
3352 | 1,
3353 | 2,
3354 | 3,
3355 | 4,
3356 | 5,
3357 | 6,
3358 | 7
3359 | ],
3360 | "smooth_stone": [
3361 | 0
3362 | ],
3363 | "snow": [
3364 | 0
3365 | ],
3366 | "snow_layer": [
3367 | 0,
3368 | 1,
3369 | 2,
3370 | 3,
3371 | 4,
3372 | 5,
3373 | 6,
3374 | 7,
3375 | 8,
3376 | 9,
3377 | 10,
3378 | 11,
3379 | 12,
3380 | 13,
3381 | 14,
3382 | 15
3383 | ],
3384 | "soul_sand": [
3385 | 0
3386 | ],
3387 | "sponge": [
3388 | 0,
3389 | 1
3390 | ],
3391 | "spruce_button": [
3392 | 0,
3393 | 1,
3394 | 2,
3395 | 3,
3396 | 4,
3397 | 5,
3398 | 6,
3399 | 7,
3400 | 8,
3401 | 9,
3402 | 10,
3403 | 11,
3404 | 12,
3405 | 13,
3406 | 14,
3407 | 15
3408 | ],
3409 | "spruce_door": [
3410 | 0,
3411 | 1,
3412 | 2,
3413 | 3,
3414 | 4,
3415 | 5,
3416 | 6,
3417 | 7,
3418 | 8,
3419 | 9,
3420 | 10,
3421 | 11,
3422 | 12,
3423 | 13,
3424 | 14,
3425 | 15,
3426 | 16,
3427 | 17,
3428 | 18,
3429 | 19,
3430 | 20,
3431 | 21,
3432 | 22,
3433 | 23,
3434 | 24,
3435 | 25,
3436 | 26,
3437 | 27,
3438 | 28,
3439 | 29,
3440 | 30,
3441 | 31
3442 | ],
3443 | "spruce_fence_gate": [
3444 | 0,
3445 | 1,
3446 | 2,
3447 | 3,
3448 | 4,
3449 | 5,
3450 | 6,
3451 | 7,
3452 | 8,
3453 | 9,
3454 | 10,
3455 | 11,
3456 | 12,
3457 | 13,
3458 | 14,
3459 | 15
3460 | ],
3461 | "spruce_pressure_plate": [
3462 | 0,
3463 | 1,
3464 | 2,
3465 | 3,
3466 | 4,
3467 | 5,
3468 | 6,
3469 | 7,
3470 | 8,
3471 | 9,
3472 | 10,
3473 | 11,
3474 | 12,
3475 | 13,
3476 | 14,
3477 | 15
3478 | ],
3479 | "spruce_stairs": [
3480 | 0,
3481 | 1,
3482 | 2,
3483 | 3,
3484 | 4,
3485 | 5,
3486 | 6,
3487 | 7
3488 | ],
3489 | "spruce_standing_sign": [
3490 | 0,
3491 | 1,
3492 | 2,
3493 | 3,
3494 | 4,
3495 | 5,
3496 | 6,
3497 | 7,
3498 | 8,
3499 | 9,
3500 | 10,
3501 | 11,
3502 | 12,
3503 | 13,
3504 | 14,
3505 | 15
3506 | ],
3507 | "spruce_trapdoor": [
3508 | 0,
3509 | 1,
3510 | 2,
3511 | 3,
3512 | 4,
3513 | 5,
3514 | 6,
3515 | 7,
3516 | 8,
3517 | 9,
3518 | 10,
3519 | 11,
3520 | 12,
3521 | 13,
3522 | 14,
3523 | 15
3524 | ],
3525 | "spruce_wall_sign": [
3526 | 0,
3527 | 1,
3528 | 2,
3529 | 3,
3530 | 4,
3531 | 5,
3532 | 6,
3533 | 7
3534 | ],
3535 | "stained_glass": [
3536 | 0,
3537 | 1,
3538 | 2,
3539 | 3,
3540 | 4,
3541 | 5,
3542 | 6,
3543 | 7,
3544 | 8,
3545 | 9,
3546 | 10,
3547 | 11,
3548 | 12,
3549 | 13,
3550 | 14,
3551 | 15
3552 | ],
3553 | "stained_glass_pane": [
3554 | 0,
3555 | 1,
3556 | 2,
3557 | 3,
3558 | 4,
3559 | 5,
3560 | 6,
3561 | 7,
3562 | 8,
3563 | 9,
3564 | 10,
3565 | 11,
3566 | 12,
3567 | 13,
3568 | 14,
3569 | 15
3570 | ],
3571 | "stained_hardened_clay": [
3572 | 0,
3573 | 1,
3574 | 2,
3575 | 3,
3576 | 4,
3577 | 5,
3578 | 6,
3579 | 7,
3580 | 8,
3581 | 9,
3582 | 10,
3583 | 11,
3584 | 12,
3585 | 13,
3586 | 14,
3587 | 15
3588 | ],
3589 | "standing_banner": [
3590 | 0,
3591 | 1,
3592 | 2,
3593 | 3,
3594 | 4,
3595 | 5,
3596 | 6,
3597 | 7,
3598 | 8,
3599 | 9,
3600 | 10,
3601 | 11,
3602 | 12,
3603 | 13,
3604 | 14,
3605 | 15
3606 | ],
3607 | "standing_sign": [
3608 | 0,
3609 | 1,
3610 | 2,
3611 | 3,
3612 | 4,
3613 | 5,
3614 | 6,
3615 | 7,
3616 | 8,
3617 | 9,
3618 | 10,
3619 | 11,
3620 | 12,
3621 | 13,
3622 | 14,
3623 | 15
3624 | ],
3625 | "sticky_piston": [
3626 | 0,
3627 | 1,
3628 | 2,
3629 | 3,
3630 | 4,
3631 | 5,
3632 | 6,
3633 | 7
3634 | ],
3635 | "stone": [
3636 | 0,
3637 | 1,
3638 | 2,
3639 | 3,
3640 | 4,
3641 | 5,
3642 | 6,
3643 | 7
3644 | ],
3645 | "stone_brick_stairs": [
3646 | 0,
3647 | 1,
3648 | 2,
3649 | 3,
3650 | 4,
3651 | 5,
3652 | 6,
3653 | 7
3654 | ],
3655 | "stone_button": [
3656 | 0,
3657 | 1,
3658 | 2,
3659 | 3,
3660 | 4,
3661 | 5,
3662 | 6,
3663 | 7,
3664 | 8,
3665 | 9,
3666 | 10,
3667 | 11,
3668 | 12,
3669 | 13,
3670 | 14,
3671 | 15
3672 | ],
3673 | "stone_pressure_plate": [
3674 | 0,
3675 | 1,
3676 | 2,
3677 | 3,
3678 | 4,
3679 | 5,
3680 | 6,
3681 | 7,
3682 | 8,
3683 | 9,
3684 | 10,
3685 | 11,
3686 | 12,
3687 | 13,
3688 | 14,
3689 | 15
3690 | ],
3691 | "stone_slab": [
3692 | 0,
3693 | 1,
3694 | 2,
3695 | 3,
3696 | 4,
3697 | 5,
3698 | 6,
3699 | 7,
3700 | 8,
3701 | 9,
3702 | 10,
3703 | 11,
3704 | 12,
3705 | 13,
3706 | 14,
3707 | 15
3708 | ],
3709 | "stone_slab2": [
3710 | 0,
3711 | 1,
3712 | 2,
3713 | 3,
3714 | 4,
3715 | 5,
3716 | 6,
3717 | 7,
3718 | 8,
3719 | 9,
3720 | 10,
3721 | 11,
3722 | 12,
3723 | 13,
3724 | 14,
3725 | 15
3726 | ],
3727 | "stone_slab3": [
3728 | 0,
3729 | 1,
3730 | 2,
3731 | 3,
3732 | 4,
3733 | 5,
3734 | 6,
3735 | 7,
3736 | 8,
3737 | 9,
3738 | 10,
3739 | 11,
3740 | 12,
3741 | 13,
3742 | 14,
3743 | 15
3744 | ],
3745 | "stone_slab4": [
3746 | 0,
3747 | 1,
3748 | 2,
3749 | 3,
3750 | 4,
3751 | 5,
3752 | 6,
3753 | 7,
3754 | 8,
3755 | 9,
3756 | 10,
3757 | 11,
3758 | 12,
3759 | 13,
3760 | 14,
3761 | 15
3762 | ],
3763 | "stone_stairs": [
3764 | 0,
3765 | 1,
3766 | 2,
3767 | 3,
3768 | 4,
3769 | 5,
3770 | 6,
3771 | 7
3772 | ],
3773 | "stonebrick": [
3774 | 0,
3775 | 1,
3776 | 2,
3777 | 3,
3778 | 4,
3779 | 5,
3780 | 6,
3781 | 7
3782 | ],
3783 | "stonecutter": [
3784 | 0
3785 | ],
3786 | "stonecutter_block": [
3787 | 0,
3788 | 1,
3789 | 2,
3790 | 3,
3791 | 4,
3792 | 5,
3793 | 6,
3794 | 7
3795 | ],
3796 | "stripped_acacia_log": [
3797 | 0,
3798 | 1,
3799 | 2,
3800 | 3
3801 | ],
3802 | "stripped_birch_log": [
3803 | 0,
3804 | 1,
3805 | 2,
3806 | 3
3807 | ],
3808 | "stripped_dark_oak_log": [
3809 | 0,
3810 | 1,
3811 | 2,
3812 | 3
3813 | ],
3814 | "stripped_jungle_log": [
3815 | 0,
3816 | 1,
3817 | 2,
3818 | 3
3819 | ],
3820 | "stripped_oak_log": [
3821 | 0,
3822 | 1,
3823 | 2,
3824 | 3
3825 | ],
3826 | "stripped_spruce_log": [
3827 | 0,
3828 | 1,
3829 | 2,
3830 | 3
3831 | ],
3832 | "structure_block": [
3833 | 0,
3834 | 1,
3835 | 2,
3836 | 3,
3837 | 4,
3838 | 5,
3839 | 6,
3840 | 7
3841 | ],
3842 | "sweet_berry_bush": [
3843 | 0,
3844 | 1,
3845 | 2,
3846 | 3,
3847 | 4,
3848 | 5,
3849 | 6,
3850 | 7
3851 | ],
3852 | "tallgrass": [
3853 | 0,
3854 | 1,
3855 | 2,
3856 | 3
3857 | ],
3858 | "tnt": [
3859 | 0,
3860 | 1,
3861 | 2,
3862 | 3
3863 | ],
3864 | "torch": [
3865 | 0,
3866 | 1,
3867 | 2,
3868 | 3,
3869 | 4,
3870 | 5,
3871 | 6,
3872 | 7
3873 | ],
3874 | "trapdoor": [
3875 | 0,
3876 | 1,
3877 | 2,
3878 | 3,
3879 | 4,
3880 | 5,
3881 | 6,
3882 | 7,
3883 | 8,
3884 | 9,
3885 | 10,
3886 | 11,
3887 | 12,
3888 | 13,
3889 | 14,
3890 | 15
3891 | ],
3892 | "trapped_chest": [
3893 | 0,
3894 | 1,
3895 | 2,
3896 | 3,
3897 | 4,
3898 | 5,
3899 | 6,
3900 | 7
3901 | ],
3902 | "tripWire": [
3903 | 0,
3904 | 1,
3905 | 2,
3906 | 3,
3907 | 4,
3908 | 5,
3909 | 6,
3910 | 7,
3911 | 8,
3912 | 9,
3913 | 10,
3914 | 11,
3915 | 12,
3916 | 13,
3917 | 14,
3918 | 15
3919 | ],
3920 | "tripwire_hook": [
3921 | 0,
3922 | 1,
3923 | 2,
3924 | 3,
3925 | 4,
3926 | 5,
3927 | 6,
3928 | 7,
3929 | 8,
3930 | 9,
3931 | 10,
3932 | 11,
3933 | 12,
3934 | 13,
3935 | 14,
3936 | 15
3937 | ],
3938 | "turtle_egg": [
3939 | 0,
3940 | 1,
3941 | 2,
3942 | 3,
3943 | 4,
3944 | 5,
3945 | 6,
3946 | 7,
3947 | 8,
3948 | 9,
3949 | 10,
3950 | 11,
3951 | 12,
3952 | 13,
3953 | 14,
3954 | 15
3955 | ],
3956 | "underwater_torch": [
3957 | 0,
3958 | 1,
3959 | 2,
3960 | 3,
3961 | 4,
3962 | 5,
3963 | 6,
3964 | 7
3965 | ],
3966 | "undyed_shulker_box": [
3967 | 0
3968 | ],
3969 | "unlit_redstone_torch": [
3970 | 0,
3971 | 1,
3972 | 2,
3973 | 3,
3974 | 4,
3975 | 5,
3976 | 6,
3977 | 7
3978 | ],
3979 | "unpowered_comparator": [
3980 | 0,
3981 | 1,
3982 | 2,
3983 | 3,
3984 | 4,
3985 | 5,
3986 | 6,
3987 | 7,
3988 | 8,
3989 | 9,
3990 | 10,
3991 | 11,
3992 | 12,
3993 | 13,
3994 | 14,
3995 | 15
3996 | ],
3997 | "unpowered_repeater": [
3998 | 0,
3999 | 1,
4000 | 2,
4001 | 3,
4002 | 4,
4003 | 5,
4004 | 6,
4005 | 7,
4006 | 8,
4007 | 9,
4008 | 10,
4009 | 11,
4010 | 12,
4011 | 13,
4012 | 14,
4013 | 15
4014 | ],
4015 | "vine": [
4016 | 0,
4017 | 1,
4018 | 2,
4019 | 3,
4020 | 4,
4021 | 5,
4022 | 6,
4023 | 7,
4024 | 8,
4025 | 9,
4026 | 10,
4027 | 11,
4028 | 12,
4029 | 13,
4030 | 14,
4031 | 15
4032 | ],
4033 | "wall_banner": [
4034 | 0,
4035 | 1,
4036 | 2,
4037 | 3,
4038 | 4,
4039 | 5,
4040 | 6,
4041 | 7
4042 | ],
4043 | "wall_sign": [
4044 | 0,
4045 | 1,
4046 | 2,
4047 | 3,
4048 | 4,
4049 | 5,
4050 | 6,
4051 | 7
4052 | ],
4053 | "water": [
4054 | 0,
4055 | 1,
4056 | 2,
4057 | 3,
4058 | 4,
4059 | 5,
4060 | 6,
4061 | 7,
4062 | 8,
4063 | 9,
4064 | 10,
4065 | 11,
4066 | 12,
4067 | 13,
4068 | 14,
4069 | 15
4070 | ],
4071 | "waterlily": [
4072 | 0
4073 | ],
4074 | "web": [
4075 | 0
4076 | ],
4077 | "wheat": [
4078 | 0,
4079 | 1,
4080 | 2,
4081 | 3,
4082 | 4,
4083 | 5,
4084 | 6,
4085 | 7
4086 | ],
4087 | "white_glazed_terracotta": [
4088 | 0,
4089 | 1,
4090 | 2,
4091 | 3,
4092 | 4,
4093 | 5,
4094 | 6,
4095 | 7
4096 | ],
4097 | "wood": [
4098 | 0,
4099 | 1,
4100 | 2,
4101 | 3,
4102 | 4,
4103 | 5,
4104 | 6,
4105 | 7,
4106 | 8,
4107 | 9,
4108 | 10,
4109 | 11,
4110 | 12,
4111 | 13,
4112 | 14,
4113 | 15
4114 | ],
4115 | "wooden_button": [
4116 | 0,
4117 | 1,
4118 | 2,
4119 | 3,
4120 | 4,
4121 | 5,
4122 | 6,
4123 | 7,
4124 | 8,
4125 | 9,
4126 | 10,
4127 | 11,
4128 | 12,
4129 | 13,
4130 | 14,
4131 | 15
4132 | ],
4133 | "wooden_door": [
4134 | 0,
4135 | 1,
4136 | 2,
4137 | 3,
4138 | 4,
4139 | 5,
4140 | 6,
4141 | 7,
4142 | 8,
4143 | 9,
4144 | 10,
4145 | 11,
4146 | 12,
4147 | 13,
4148 | 14,
4149 | 15,
4150 | 16,
4151 | 17,
4152 | 18,
4153 | 19,
4154 | 20,
4155 | 21,
4156 | 22,
4157 | 23,
4158 | 24,
4159 | 25,
4160 | 26,
4161 | 27,
4162 | 28,
4163 | 29,
4164 | 30,
4165 | 31
4166 | ],
4167 | "wooden_pressure_plate": [
4168 | 0,
4169 | 1,
4170 | 2,
4171 | 3,
4172 | 4,
4173 | 5,
4174 | 6,
4175 | 7,
4176 | 8,
4177 | 9,
4178 | 10,
4179 | 11,
4180 | 12,
4181 | 13,
4182 | 14,
4183 | 15
4184 | ],
4185 | "wooden_slab": [
4186 | 0,
4187 | 1,
4188 | 2,
4189 | 3,
4190 | 4,
4191 | 5,
4192 | 6,
4193 | 7,
4194 | 8,
4195 | 9,
4196 | 10,
4197 | 11,
4198 | 12,
4199 | 13,
4200 | 14,
4201 | 15
4202 | ],
4203 | "wool": [
4204 | 0,
4205 | 1,
4206 | 2,
4207 | 3,
4208 | 4,
4209 | 5,
4210 | 6,
4211 | 7,
4212 | 8,
4213 | 9,
4214 | 10,
4215 | 11,
4216 | 12,
4217 | 13,
4218 | 14,
4219 | 15
4220 | ],
4221 | "yellow_flower": [
4222 | 0
4223 | ],
4224 | "yellow_glazed_terracotta": [
4225 | 0,
4226 | 1,
4227 | 2,
4228 | 3,
4229 | 4,
4230 | 5,
4231 | 6,
4232 | 7
4233 | ]
4234 | }
4235 | }
--------------------------------------------------------------------------------
/mapping_files/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmmp/bds-modding-devkit/83275dce19840146085ccc437bf2c832625bf554/mapping_files/.keep
--------------------------------------------------------------------------------
/print_enum.py:
--------------------------------------------------------------------------------
1 | import gdb
2 |
3 | class PrintEnumCmd(gdb.Command):
4 | """print all elements of the given enum type"""
5 |
6 | def __init__(self):
7 | super(PrintEnumCmd, self).__init__("print-enum", gdb.COMMAND_DATA, gdb.COMPLETE_EXPRESSION)
8 |
9 | def invoke(self, argstr, from_tty):
10 | typename = argstr
11 | if not typename or typename.isspace():
12 | raise gdb.GdbError("Usage: print-enum type")
13 |
14 | try:
15 | t = gdb.lookup_type(typename)
16 | except gdb.error:
17 | typename = "enum " + typename
18 | try:
19 | t = gdb.lookup_type(typename)
20 | except gdb.error:
21 | raise gdb.GdbError("type " + typename + " not found")
22 |
23 | # if t.code != gdb.TYPE_CODE_ENUM:
24 | # raise gdb.GdbError("type " + typename + " is not an enum")
25 |
26 | for f in t.fields():
27 | print(f.name, "=", f.enumval, hex(f.enumval))
28 |
29 | PrintEnumCmd()
30 |
--------------------------------------------------------------------------------
/protocol_info_dumper.py:
--------------------------------------------------------------------------------
1 | import subprocess
2 | import re
3 | import struct
4 | import sys
5 | import os
6 | import threading
7 | import json
8 |
9 | if len(sys.argv) < 2:
10 | exit("Args: [output JSON file path]")
11 |
12 | def convert_windows_path(path):
13 | return path.replace('\\', '/').replace('C:', '/mnt/c')
14 |
15 | bds_path = convert_windows_path(sys.argv[1])
16 | if len(sys.argv) == 3:
17 | output_file_path = convert_windows_path(sys.argv[2])
18 | else:
19 | output_file_path = 'protocol_info.json'
20 |
21 | print('Dumping data from ' + bds_path)
22 | print('Output file path ' + output_file_path)
23 |
24 | asm_regex = re.compile(r'.*\$(0x[A-Fa-f\d]+),%eax.*')
25 | symbol_match_regex = re.compile(r'([\da-zA-Z]+) (.{7}) (\.[A-Za-z\d_]+)\s+([\da-zA-Z]+)\s+(?:Base|\.hidden)?\s+(.+)')
26 | rodata_offset_regex = re.compile(r"^\s*\d+\s+\.rodata\s+[\da-f]+\s+[\da-f]+\s+([\da-f]+)\s+([\da-f]+)")
27 |
28 | def get_value_at(file, offset, size, format):
29 | file = open(file, 'rb')
30 | if offset == None or offset < 0:
31 | return -1
32 | file.seek(offset)
33 | return struct.unpack(format, file.read(size))[0]
34 |
35 | def stop_address(start, size):
36 | return hex(int('0x' + start, 16) + int('0x' + size, 16))
37 |
38 | def dump_packet_id(start, size, symbol):
39 | proc = subprocess.Popen(['objdump', '--disassemble', '--demangle', '--section=.text', '--start-address=0x' + start, '--stop-address=' + stop_address(start, size), bds_path], stdout=subprocess.PIPE)
40 | lines = []
41 | while True:
42 | line_bytes = proc.stdout.readline()
43 | if not line_bytes:
44 | break
45 | line = line_bytes.decode('utf-8')
46 | lines.append(line)
47 | parts = line.split('mov')
48 | if len(parts) < 2:
49 | continue
50 | matches = re.match(asm_regex, parts[1])
51 | if not matches:
52 | continue
53 | return int(matches.groups()[0], 16)
54 | for l in lines:
55 | print(l)
56 | raise Exception("Packet ID not found for symbol " + symbol)
57 |
58 | def dump_packet_id_threaded(start, size, symbol, packet_name, packets, packets_lock):
59 | id = dump_packet_id(start, size, symbol)
60 | packets_lock.acquire()
61 | packets[packet_name] = id
62 | print('Found ' + packet_name + ' ' + hex(id))
63 | packets_lock.release()
64 |
65 | def parse_symbol(symbol):
66 | parts = re.match(symbol_match_regex, symbol)
67 | if not parts:
68 | raise Exception("Regex match failed for \"" + symbol + "\"")
69 | if len(parts.groups()) < 5:
70 | raise Exception("Wrong number of matches for \"" + symbol + "\" " + str(len(parts.groups())))
71 | start = parts.groups()[0]
72 | flags = parts.groups()[1]
73 | section = parts.groups()[2]
74 | size = parts.groups()[3]
75 | symbol = parts.groups()[4]
76 | return start, flags, section, size, symbol
77 |
78 | def dump_packet_ids():
79 | packets = {}
80 | packets_lock = threading.Lock()
81 | threads = [None] * 8
82 | proc = subprocess.Popen(['objdump --demangle -tT --dwarf=follow-links \'' + bds_path + '\' | grep Packet | grep \'::getId()\''], shell=True, stdout=subprocess.PIPE)
83 | while True:
84 | symbol = proc.stdout.readline()
85 | if not symbol:
86 | break
87 | start, _, _, size, symbol = parse_symbol(symbol.decode('utf-8'))
88 | packet_name = symbol.split('::')[0]
89 | thread_index = None
90 | for i in range(len(threads)):
91 | if threads[i] is None:
92 | thread_index = i
93 | break
94 | while thread_index is None:
95 | for i in range(len(threads)):
96 | threads[i].join(0.1)
97 | if not threads[i].is_alive():
98 | thread_index = i
99 | threads[i] = None
100 | break
101 |
102 | t = threading.Thread(target=dump_packet_id_threaded, args=(start, size, symbol, packet_name, packets, packets_lock))
103 | t.start()
104 | threads[i] = t
105 | for t in threads:
106 | t.join()
107 | return packets
108 |
109 | def get_rodata_file_shift():
110 | proc = subprocess.Popen(['objdump -h -j \'.rodata\' \'' + bds_path + '\''], shell=True, stdout=subprocess.PIPE)
111 | while True:
112 | line = proc.stdout.readline()
113 | if not line:
114 | break
115 | matches = re.match(rodata_offset_regex, line.strip().decode('utf-8'))
116 | if matches:
117 | lma = int('0x' + matches.groups()[0], 16)
118 | physical_address = int('0x' + matches.groups()[1], 16)
119 | return physical_address - lma
120 | raise Exception("Unable to calculate offset for .rodata")
121 |
122 | def dump_version():
123 | rodata_shift = get_rodata_file_shift()
124 | proc = subprocess.Popen(['objdump --demangle -tT --dwarf=follow-links \'' + bds_path + '\' | grep SharedConstants'], shell=True, stdout=subprocess.PIPE)
125 | major = None
126 | minor = None
127 | patch = None
128 | revision = None
129 | beta = False
130 | protocol = None
131 | while True:
132 | symbol = proc.stdout.readline()
133 | if not symbol:
134 | break
135 | start, _, _, size, symbol = parse_symbol(symbol.decode('utf-8'))
136 | if symbol.endswith('MajorVersion'):
137 | major = get_value_at(bds_path, int('0x' + start, 16) + rodata_shift, int('0x' + size, 16), 'i')
138 | elif symbol.endswith('MinorVersion'):
139 | minor = get_value_at(bds_path, int('0x' + start, 16) + rodata_shift, int('0x' + size, 16), 'i')
140 | elif symbol.endswith('PatchVersion'):
141 | patch = get_value_at(bds_path, int('0x' + start, 16) + rodata_shift, int('0x' + size, 16), 'i')
142 | elif symbol.endswith('RevisionVersion'):
143 | revision = get_value_at(bds_path, int('0x' + start, 16) + rodata_shift, int('0x' + size, 16), 'i')
144 | elif symbol.endswith('IsBeta'):
145 | beta = get_value_at(bds_path, int('0x' + start, 16) + rodata_shift, int('0x' + size, 16), 'B') == 1
146 | elif symbol.endswith('NetworkProtocolVersion'):
147 | protocol = get_value_at(bds_path, int('0x' + start, 16) + rodata_shift, int('0x' + size, 16), 'i')
148 |
149 | print('Version: %d.%d.%d.%d\nProtocol version: %d\nBeta: %d' % (major, minor, patch, revision, protocol, beta))
150 | return {
151 | "major": major,
152 | "minor": minor,
153 | "patch": patch,
154 | "revision": revision,
155 | "beta": beta,
156 | "protocol_version": protocol
157 | }
158 |
159 | version = dump_version()
160 | packets = dump_packet_ids()
161 | output_data = {}
162 | output_data["version"] = version
163 | output_data["packets"] = dict(sorted(packets.items(), key=lambda item: item[1]))
164 |
165 | with open(output_file_path, 'w') as output_file:
166 | json.dump(output_data, output_file, indent=4)
167 |
168 | print('Done!')
169 |
--------------------------------------------------------------------------------
/python_requirements.txt:
--------------------------------------------------------------------------------
1 | frida~=16.5
2 | lief~=0.15.0
3 |
--------------------------------------------------------------------------------
/scripts/build:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | FILE="$0"
4 | MYDIR=$(dirname -- "$FILE")
5 |
6 | source "$MYDIR/shared"
7 |
8 | if [ $# -ne 1 ]; then
9 | echo "${LC}Builds all mods or selected$R"
10 | echo "${LC}Usage: ${LR}$0 ${LC}<${LY}all|mod name${LC}>$R"
11 | exit 1
12 | fi
13 |
14 | if [[ "$1" == "all" ]]; then
15 | build_all_mods "$MODS_CODE" "$CMAKE_FLAGS"
16 | else
17 | build_mod "$PWD/code/$1" "$CMAKE_FLAGS"
18 | fi
19 |
20 | echo "${LG} > All mods built successfully. To start the server with mods loaded, run ${LY}./start.sh$R"
21 |
--------------------------------------------------------------------------------
/scripts/clean-server:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | FILE="$0"
4 | MYDIR=$(dirname -- "$FILE")
5 |
6 | source "$MYDIR/shared"
7 |
8 | if [ $# -ne 0 ]; then
9 | echo "${LC}Removes the old server binaries, leaving configs and worlds intact$R"
10 | echo "${LC}Usage: ${LR}$0$R"
11 | exit 1
12 | fi
13 |
14 | clean_old_server "$PWD"
15 |
--------------------------------------------------------------------------------
/scripts/export-server-symbols:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | FILE="$0"
4 | MYDIR=$(dirname -- "$FILE")
5 |
6 | source "$MYDIR/shared"
7 |
8 | if [ $# -ne 0 ]; then
9 | echo "${LC}Patches bedrock_server_symbols.debug to make its debugging symbols linkable$R"
10 | echo "${LC}Usage: ${LR}$0$R"
11 | exit 1
12 | fi
13 |
14 | set -e
15 | export_server_symbols "$PWD/bedrock_server_symbols.debug" "$PWD/bedrock_server_symbols_test.debug"
16 |
--------------------------------------------------------------------------------
/scripts/gen:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | FILE="$0"
4 | MYDIR=$(dirname -- "$FILE")
5 |
6 | source "$MYDIR/shared"
7 |
8 | if [ $# -ne 1 ]; then
9 | echo "${LC}Generates template for mod$R"
10 | echo "${LC}Usage: ${LR}$0 ${LC}<${LY}mod name${LC}>$R"
11 | exit 1
12 | fi
13 |
14 | MODNAME="$1"
15 | mkdir -p "$MODS_CODE/$MODNAME/src" && cd $MODS_CODE
16 | echo "cmake_minimum_required(VERSION 3.0)
17 | project($MODNAME)
18 |
19 | set(CMAKE_PREFIX_PATH ../../sdk)
20 | set(CMAKE_CXX_STANDARD 17)
21 | set(CMAKE_POSITION_INDEPENDENT_CODE ON)
22 |
23 | find_package(ModLoader REQUIRED)
24 |
25 | add_library($MODNAME SHARED src/main.cpp)
26 | target_link_libraries($MODNAME PUBLIC ModLoader)" > "$MODS_CODE/$MODNAME/CMakeLists.txt"
27 | echo "#include
28 | #include
29 |
30 | using namespace modloader;
31 |
32 | #define TAG \"$MODNAME\"
33 |
34 | extern \"C\" void modloader_on_server_start(void* serverInstance) {
35 | Log::verbose(TAG, \"Hello, world!\");
36 | }" > "$MODS_CODE/$MODNAME/src/main.cpp"
37 |
38 | echo "$LG > Successfully generated skeleton files in $MODS_CODE/$MODNAME$R"
39 |
--------------------------------------------------------------------------------
/scripts/install-modloader:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | FILE="$0"
4 | MYDIR=$(dirname -- "$FILE")
5 |
6 | source "$MYDIR/shared"
7 |
8 | if [ $# -ne 0 ]; then
9 | echo "${LC}Installs latest ModLoader binaries and SDK$R"
10 | echo "${LC}Usage: ${LR}$0$R"
11 | exit 1
12 | fi
13 |
14 | install_modloader "$PWD"
15 |
--------------------------------------------------------------------------------
/scripts/install-server:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | FILE="$0"
4 | MYDIR=$(dirname -- "$FILE")
5 |
6 | source "$MYDIR/shared"
7 |
8 | if [ $# -ne 1 ]; then
9 | echo "${LC}Installs server files from the given directory into ${LG}$PWD$R"
10 | echo "${LC}Usage: ${LR}$0 ${LC}<${LY}server files path${LC}>$R"
11 | exit 1
12 | fi
13 |
14 | install_server "$1" "$PWD"
15 |
16 |
17 | echo "${LG} > Installation successful."
18 | echo "${LG} > Don't forget to build mods before running the server: ${LY}$MYDIR/build all$R"
19 |
20 |
--------------------------------------------------------------------------------
/scripts/setup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | FILE="$0"
4 | MYDIR=$(dirname -- "$FILE")
5 |
6 | source "$MYDIR/shared"
7 |
8 | if [ $# -ne 1 ]; then
9 | echo "${LC}Sets everything up from scratch for the first time$R"
10 | echo "${LC}Usage: ${LR}$0 ${LC}<${LY}server files path${LC}>$R"
11 | exit 1
12 | fi
13 |
14 | install_modloader "$PWD"
15 | install_server "$1" "$PWD"
16 | build_all_mods "$MODS_CODE" "$CMAKE_FLAGS"
17 |
18 | echo "${LY}>>> Setup successful. Try ${LG}./start.sh ${LY}<<<$R"
19 |
--------------------------------------------------------------------------------
/scripts/shared:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | R=$(echo -en '\033[0m')
3 | LR=$(echo -en '\033[01;31m')
4 | LG=$(echo -en '\033[01;32m')
5 | LY=$(echo -en '\033[01;33m')
6 | LC=$(echo -en '\033[01;36m')
7 | W=$(echo -en '\033[01;37m')
8 |
9 | LIBS="$PWD/mods"
10 | MODS_CODE="$PWD/code"
11 | SDK="$PWD/sdk"
12 | CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=\"$SDK\""
13 |
14 | show_help(){
15 | echo "${LC}Usage: $LG$0 ${LR}command ${LC}<${LY}arguments${LC}>
16 |
17 | ${LG}Available commands:
18 | ${LR}setup ${LC}<${LY}server files path${LC}>${W} — ${LC}sets everything up from scratch for the first time
19 | ${LR}clean-server${W} — ${LC}removes the old server binaries, leaving configs and worlds intact
20 | ${LR}install-server ${LC}<${LY}server files path${LC}>${W} — ${LC}installs server files from the given directory
21 | ${LR}install-modloader${W} — ${LC}installs latest ModLoader binaries and SDK
22 | ${LR}gen ${LC}<${LY}name${LC}>${W} — ${LC}generates template for mod
23 | ${LR}build ${LC}<${LY}all${LC}|${LY}name${LC}>${W} — ${LC}builds all mods or selected$R"
24 | }
25 |
26 | download(){
27 | echo "${LY} > Downloading file: $1$R"
28 | curl --silent --show-error --location --globoff $1 > $2
29 | if [[ "$3" = true ]]; then
30 | unzip -qq $2 && rm $2 || exit 1
31 | fi
32 | }
33 |
34 | get_latest_release(){
35 | curl -s "https://api.github.com/repos/$1/releases/latest" | grep '"browser_download_url":.'$2 | sed -E 's/.*"([^"]+)".*/\1/'
36 | }
37 |
38 | check_args(){
39 | if [ "$1" -ne $2 ]; then
40 | show_help && exit 0
41 | fi
42 | }
43 |
44 | setup_sdk(){
45 | local working_directory="$1"
46 | cd "$working_directory"
47 | rm -rf sdk && mkdir -p sdk && cd sdk
48 | download "$(get_latest_release "minecraft-linux/server-modloader" "*\.zip")" mod_sdk.zip true
49 | cd ..
50 | }
51 |
52 | build_mod(){
53 | local mod_path="$1"
54 | local cmake_flags="$2"
55 | if [[ -f "$1/CMakeLists.txt" ]]; then
56 | cd "$mod_path"
57 |
58 | mkdir -p build && cd build
59 | cmake $cmake_flags .. || exit 1
60 | make -j2 || exit 1
61 |
62 | cp *.so $LIBS
63 | else
64 | echo "${LR} Could not find $mod_path"
65 | exit 1
66 | fi
67 | }
68 |
69 | clean_old_server(){
70 | local working_directory="$1"
71 | cd "$working_directory"
72 | rm -rf structures behavior_packs resource_packs definitions || true
73 | rm bedrock_server bedrock_server_symbols.debug bedrock_server_symbols_test.debug || true
74 | echo "${LG} > Old server files removed from ${working_directory}$R"
75 | }
76 |
77 | export_server_symbols(){
78 | local input_path="$1"
79 | local output_path="$2"
80 |
81 | echo "${LY} > Copying server binary"
82 | cp "$input_path" "$output_path"
83 |
84 | echo "${LY} > Stripping DWARF if present"
85 | strip --strip-debug "$output_path"
86 |
87 | echo "${LY} > Converting symbols"
88 | python3 export-symbols.py "$output_path" "$output_path"
89 | }
90 |
91 | copy_server_files(){
92 | local working_directory="$2"
93 | local server_files="$1"
94 |
95 | echo "${LY} > Installing new server files from $server_files (this might take a few minutes)${R}"
96 | cp -r "$server_files/structures" "$working_directory"
97 | cp -r "$server_files/behavior_packs" "$working_directory"
98 | cp -r "$server_files/resource_packs" "$working_directory"
99 | cp -r "$server_files/definitions" "$working_directory"
100 | cp "$server_files/bedrock_server" "$working_directory"
101 | if [ -f "$server_files/bedrock_server_symbols.debug" ]; then
102 | cp "$server_files/bedrock_server_symbols.debug" "$working_directory"
103 | else
104 | echo "${LY} > This version has symbols embedded in bedrock_server directly - copying bedrock_server to bedrock_server_symbols.debug$R"
105 | cp "$server_files/bedrock_server" "$working_directory/bedrock_server_symbols.debug"
106 | fi
107 |
108 | if [ ! -f "$working_directory/server.properties" ]; then
109 | echo "${LY} > Creating server.properties$R"
110 | cp "$server_files/server.properties" "$working_directory"
111 | else
112 | echo "${LY} > server.properties already exists$R"
113 | fi
114 |
115 | echo "${LG} > New server files installed!"
116 | }
117 |
118 | install_server(){
119 | local input_files="$1"
120 | local working_directory="$2"
121 |
122 | clean_old_server "$working_directory"
123 |
124 | if [ -f "$input_files" ]; then
125 | echo "${LY} ! $input_files is a file, not a folder. Assuming this is a zip${R}"
126 | local temp_dir="$PWD/.new_server_files"
127 | rm -rf "$temp_dir" || true 2>/dev/null
128 | unzip -q "$input_files" -d "$temp_dir" || exit 1
129 | echo "${LY} > Server files successfully extracted to $temp_dir${R}"
130 | local server_files="$temp_dir"
131 | else
132 | local server_files="$input_files"
133 | fi
134 |
135 | copy_server_files "$server_files" "$working_directory"
136 |
137 | export_server_symbols "$working_directory/bedrock_server_symbols.debug" "$working_directory/bedrock_server_symbols_test.debug" || echo "${LR} !!! Error exporting symbols, aborting$R" && exit 1
138 | }
139 |
140 | install_modloader(){
141 | local working_directory="$1"
142 | setup_sdk "$working_directory"
143 | mkdir -p "$working_directory/mods/"
144 |
145 | echo "${LG} > modloader-sdk downloaded!$R"
146 | echo "${LY} > modloader-sdk saved in $working_directory$R"
147 | }
148 |
149 | build_all_mods(){
150 | local mods_code="$1"
151 | local cmake_flags="$2"
152 | export -f build_mod && export LIBS=$LIBS
153 | find "$mods_code" -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0 -n1 -P4 -I '@' bash -c "build_mod @ \"$cmake_flags\" || exit 255" || exit 1
154 | }
155 |
--------------------------------------------------------------------------------
/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | PRELOAD=sdk/lib/libserver_modloader.so
3 | LIBS=.
4 | [ -z "$BDS" ] && BDS=./bedrock_server_symbols_test.debug
5 |
6 | start_server(){
7 | if [ -n "$VANILLA" ]; then
8 | LD_LIBRARY_PATH=$LIBS $BDS $@
9 | elif [ -n "$DEBUG" ]; then
10 | #auto-load safe-path disabled to allow libthread_db to load
11 | gdb \
12 | -ex "set exec-wrapper env 'LD_PRELOAD=$PRELOAD'" \
13 | -ex "set auto-load safe-path /" \
14 | -ex "echo ----- Mod debugging set up. Type \"run\" to start the server. -----\n" \
15 | $BDS $@
16 | else
17 | LD_PRELOAD=$PRELOAD LD_LIBRARY_PATH=$LIBS $BDS $@
18 | fi
19 | }
20 |
21 | while getopts "vdl" OPTION 2> /dev/null; do
22 | case ${OPTION} in
23 | v)
24 | VANILLA=true
25 | ;;
26 | d)
27 | DEBUG=true
28 | ;;
29 | l)
30 | DO_LOOP=true
31 | ;;
32 | \?)
33 | break
34 | ;;
35 | esac
36 | done
37 |
38 | if [ -n "$DO_LOOP" ]; then
39 | while true; do
40 | start_server
41 | echo "To escape the loop, press CTRL+C now. Otherwise, wait 5 seconds for the server to restart."
42 | echo ""
43 | sleep 5
44 | done
45 | else
46 | start_server
47 | fi
48 |
49 |
--------------------------------------------------------------------------------
/tracer.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 | # -*- coding: utf-8 -*-
3 |
4 | import frida
5 | import sys
6 | import json
7 | import argparse
8 | import subprocess
9 | import base64
10 | import time
11 |
12 | def validateMode(mode):
13 | if mode not in 'rw':
14 | raise argparse.ArgumentTypeError('Unknown mode')
15 | return mode
16 |
17 | parser = argparse.ArgumentParser(description='bedrock_server packet tracer')
18 | parser.add_argument('mode', help='"r" - read, "w" - write', type=validateMode)
19 | parser.add_argument('processName', default='bedrock_server_symbols.debug')
20 | args = parser.parse_args()
21 | stopped = False
22 |
23 | try:
24 | session = frida.attach(args.processName)
25 | except frida.ProcessNotFoundError:
26 | sys.exit('Could not find bedrock_server process')
27 | except frida.PermissionDeniedError as e:
28 | sys.exit(e)
29 |
30 | logpath = './packets_' + str(time.time()) + '.txt'
31 | logfile = open(logpath, 'wb')
32 |
33 | def onMessage(message, data):
34 | if message['type'] == 'error':
35 | print(message['stack'])
36 | return
37 | try:
38 | logfile.write(str.encode(message['payload']) + b':' + base64.b64encode(data) + b'\n')
39 | except:
40 | print(message)
41 |
42 | def onExit():
43 | print("Server process died!\n")
44 | global stopped
45 | stopped = True
46 |
47 | try:
48 | script = session.create_script("""recv('input', function(message) {
49 | var mode = message.mode;
50 | var doRead = mode.includes('r');
51 | var doWrite = mode.includes('w');
52 | var file = message.file;
53 | var count = 0;
54 | Module.enumerateSymbols(file).forEach(function(exportedFunc) {
55 | if (exportedFunc.type !== 'function') {
56 | return;
57 | }
58 | if (!exportedFunc.name.includes('Packet')) {
59 | return;
60 | }
61 | if (doRead && (exportedFunc.name.endsWith('Packet4readER20ReadOnlyBinaryStream') || exportedFunc.name.endsWith('Packet5_readER20ReadOnlyBinaryStream'))) {
62 | console.log("Hooking function " + exportedFunc.name);
63 | Interceptor.attach(exportedFunc.address, {
64 | onEnter: function(args) {
65 | //this used to be arg1, but changed to arg2 in 1.20
66 | //perhaps some return-over-stack compiler optimisation generated more args?
67 | this.pointer = args[2];
68 | },
69 | onLeave: function(retval) {
70 | var baseAddr = Memory.readPointer(this.pointer.add(48)); //56 prior to 1.20.40 - changing to libc++ changed BinaryStream layout
71 | var bufferAddr = baseAddr.add(16); //0 before 1.20.40 - strings have a different layout in libc++
72 | var rlen = Memory.readULong(baseAddr.add(8));
73 | var bytes = Memory.readByteArray(Memory.readPointer(bufferAddr), rlen);
74 | if (bytes === null) {
75 | console.log("Unexpected null payload from " + exportedFunc.name);
76 | } else {
77 | send('read', bytes);
78 | }
79 | }
80 | });
81 | count++;
82 | }
83 | if (doWrite && exportedFunc.name.endsWith('Packet5writeER12BinaryStream')) {
84 | console.log("Hooking function " + exportedFunc.name);
85 | try{
86 | Interceptor.attach(exportedFunc.address, {
87 | onEnter: function(args) {
88 | this.pointer = args[1];
89 | },
90 | onLeave: function(retval) {
91 | var baseAddr = Memory.readPointer(this.pointer.add(48));
92 | var bufferAddr = baseAddr.add(16); //0 before 1.20.40 - strings have a different layout in libc++
93 | var rlen = Memory.readULong(baseAddr.add(8));
94 | var bytes = Memory.readByteArray(Memory.readPointer(bufferAddr), rlen);
95 | if (bytes === null) {
96 | console.log("Unexpected null payload from " + exportedFunc.name);
97 | } else {
98 | send('write', bytes);
99 | }
100 | }
101 | });
102 | count++;
103 | } catch (e) {
104 | console.log("Error intercepting function " + exportedFunc.name + ": " + e.toString());
105 | }
106 | }
107 | });
108 | console.log("Hooked " + count + " functions. Ready.");
109 | });
110 | """)
111 |
112 | script.on('message', onMessage)
113 | script.load()
114 | script.post({
115 | 'type': 'input',
116 | 'mode': args.mode,
117 | 'file': args.processName
118 | })
119 |
120 | session.on('detached', onExit)
121 | while not stopped:
122 | time.sleep(1)
123 | logfile.close()
124 |
125 | print('Packet logs written to ' + logpath)
126 | print("Bye\n")
127 | sys.exit(0)
128 | except KeyboardInterrupt:
129 | logfile.close()
130 | sys.exit(0)
131 |
--------------------------------------------------------------------------------