@vaitosoi/minejs 0.5.1 → 0.6.0
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.
- package/README.md +4 -0
- package/assets/minecraft/26.2/components.json +113 -0
- package/assets/minecraft/26.2/packets.json +8 -16
- package/assets/minecraft/26.3/packets.json +4767 -0
- package/assets/minecraft/versionMapping.json +16 -0
- package/dist/binary/decoder.d.ts +35 -0
- package/dist/binary/decoder.d.ts.map +1 -1
- package/dist/binary/decoder.js +665 -2
- package/dist/binary/decoder.js.map +1 -1
- package/dist/binary/encoder.d.ts +3 -3
- package/dist/binary/encoder.d.ts.map +1 -1
- package/dist/binary/encoder.js.map +1 -1
- package/dist/client/client.d.ts +58 -1
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +38 -0
- package/dist/client/client.js.map +1 -1
- package/dist/net/tcp.d.ts +6 -2
- package/dist/net/tcp.d.ts.map +1 -1
- package/dist/net/tcp.js +5 -2
- package/dist/net/tcp.js.map +1 -1
- package/dist/packet/listener.d.ts +5 -0
- package/dist/packet/listener.d.ts.map +1 -1
- package/dist/packet/listener.js +78 -5
- package/dist/packet/listener.js.map +1 -1
- package/dist/packet/sender.d.ts +3 -1
- package/dist/packet/sender.d.ts.map +1 -1
- package/dist/packet/sender.js +15 -0
- package/dist/packet/sender.js.map +1 -1
- package/dist/physics/aabb.js +7 -7
- package/dist/physics/aabb.js.map +1 -1
- package/dist/physics/player.js +1 -5
- package/dist/physics/player.js.map +1 -1
- package/dist/version/codec.d.ts.map +1 -1
- package/dist/version/codec.js +25 -14
- package/dist/version/codec.js.map +1 -1
- package/dist/version/registry.d.ts +21 -5
- package/dist/version/registry.d.ts.map +1 -1
- package/dist/version/registry.js +55 -18
- package/dist/version/registry.js.map +1 -1
- package/dist/world/block.d.ts +10 -8
- package/dist/world/block.d.ts.map +1 -1
- package/dist/world/block.js +17 -11
- package/dist/world/block.js.map +1 -1
- package/dist/world/container.d.ts +106 -0
- package/dist/world/container.d.ts.map +1 -0
- package/dist/world/container.js +240 -0
- package/dist/world/container.js.map +1 -0
- package/dist/world/state.d.ts +8 -5
- package/dist/world/state.d.ts.map +1 -1
- package/dist/world/state.js +2 -0
- package/dist/world/state.js.map +1 -1
- package/package.json +2 -2
- package/src/binary/decoder.ts +691 -2
- package/src/binary/encoder.ts +3 -3
- package/src/client/client.ts +81 -4
- package/src/net/tcp.ts +16 -5
- package/src/packet/listener.ts +103 -6
- package/src/packet/sender.ts +26 -2
- package/src/physics/aabb.ts +7 -7
- package/src/physics/player.ts +5 -5
- package/src/version/codec.ts +24 -14
- package/src/version/registry.ts +61 -17
- package/src/world/block.ts +19 -17
- package/src/world/container.ts +180 -0
- package/src/world/state.ts +11 -6
- package/test/client/index.ts +49 -21
- package/test/client/registry.json +1735 -0
package/README.md
CHANGED
|
@@ -12,6 +12,10 @@ This package is highly unstable for now, please report if there is any bug, glit
|
|
|
12
12
|
|
|
13
13
|
Also, since there is some problem with authenticating and appId approval, I haven't completed the join "online server" part yet. [See more here](#iv-about-joining-online-server)
|
|
14
14
|
|
|
15
|
+
About support version:
|
|
16
|
+
+ `26.2` is supported well since the Wiki page of it is considered as the stable.
|
|
17
|
+
+ `26.3` is partially supported since the page for 26.3 is under construction.
|
|
18
|
+
|
|
15
19
|
## II. Usage
|
|
16
20
|
|
|
17
21
|
Install MineJS using your favorite package manager:
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"minecraft:additional_trade_cost": 41,
|
|
3
|
+
"minecraft:attack_range": 30,
|
|
4
|
+
"minecraft:attribute_modifiers": 16,
|
|
5
|
+
"minecraft:axolotl/variant": 105,
|
|
6
|
+
"minecraft:banner_patterns": 72,
|
|
7
|
+
"minecraft:base_color": 73,
|
|
8
|
+
"minecraft:bees": 77,
|
|
9
|
+
"minecraft:block_entity_data": 60,
|
|
10
|
+
"minecraft:block_state": 76,
|
|
11
|
+
"minecraft:blocks_attacks": 37,
|
|
12
|
+
"minecraft:break_sound": 81,
|
|
13
|
+
"minecraft:bucket_entity_data": 59,
|
|
14
|
+
"minecraft:bundle_contents": 50,
|
|
15
|
+
"minecraft:can_break": 15,
|
|
16
|
+
"minecraft:can_place_on": 14,
|
|
17
|
+
"minecraft:cat/collar": 108,
|
|
18
|
+
"minecraft:cat/sound_variant": 107,
|
|
19
|
+
"minecraft:cat/variant": 106,
|
|
20
|
+
"minecraft:charged_projectiles": 49,
|
|
21
|
+
"minecraft:chicken/sound_variant": 99,
|
|
22
|
+
"minecraft:chicken/variant": 98,
|
|
23
|
+
"minecraft:consumable": 24,
|
|
24
|
+
"minecraft:container": 75,
|
|
25
|
+
"minecraft:container_loot": 80,
|
|
26
|
+
"minecraft:cow/sound_variant": 97,
|
|
27
|
+
"minecraft:cow/variant": 96,
|
|
28
|
+
"minecraft:creative_slot_lock": 20,
|
|
29
|
+
"minecraft:custom_data": 0,
|
|
30
|
+
"minecraft:custom_model_data": 17,
|
|
31
|
+
"minecraft:custom_name": 6,
|
|
32
|
+
"minecraft:damage": 3,
|
|
33
|
+
"minecraft:damage_resistant": 27,
|
|
34
|
+
"minecraft:damage_type": 8,
|
|
35
|
+
"minecraft:death_protection": 36,
|
|
36
|
+
"minecraft:debug_stick_state": 57,
|
|
37
|
+
"minecraft:dye": 43,
|
|
38
|
+
"minecraft:dyed_color": 44,
|
|
39
|
+
"minecraft:enchantable": 31,
|
|
40
|
+
"minecraft:enchantment_glint_override": 21,
|
|
41
|
+
"minecraft:enchantments": 13,
|
|
42
|
+
"minecraft:entity_data": 58,
|
|
43
|
+
"minecraft:equippable": 32,
|
|
44
|
+
"minecraft:firework_explosion": 68,
|
|
45
|
+
"minecraft:fireworks": 69,
|
|
46
|
+
"minecraft:food": 23,
|
|
47
|
+
"minecraft:fox/variant": 86,
|
|
48
|
+
"minecraft:frog/variant": 101,
|
|
49
|
+
"minecraft:glider": 34,
|
|
50
|
+
"minecraft:horse/variant": 102,
|
|
51
|
+
"minecraft:instrument": 61,
|
|
52
|
+
"minecraft:intangible_projectile": 22,
|
|
53
|
+
"minecraft:item_model": 10,
|
|
54
|
+
"minecraft:item_name": 9,
|
|
55
|
+
"minecraft:jukebox_playable": 64,
|
|
56
|
+
"minecraft:kinetic_weapon": 39,
|
|
57
|
+
"minecraft:llama/variant": 104,
|
|
58
|
+
"minecraft:lock": 79,
|
|
59
|
+
"minecraft:lodestone_tracker": 67,
|
|
60
|
+
"minecraft:lore": 11,
|
|
61
|
+
"minecraft:map_color": 45,
|
|
62
|
+
"minecraft:map_decorations": 47,
|
|
63
|
+
"minecraft:map_id": 46,
|
|
64
|
+
"minecraft:map_post_processing": 48,
|
|
65
|
+
"minecraft:max_damage": 2,
|
|
66
|
+
"minecraft:max_stack_size": 1,
|
|
67
|
+
"minecraft:minimum_attack_charge": 7,
|
|
68
|
+
"minecraft:mooshroom/variant": 92,
|
|
69
|
+
"minecraft:note_block_sound": 71,
|
|
70
|
+
"minecraft:ominous_bottle_amplifier": 63,
|
|
71
|
+
"minecraft:painting/variant": 103,
|
|
72
|
+
"minecraft:parrot/variant": 88,
|
|
73
|
+
"minecraft:piercing_weapon": 38,
|
|
74
|
+
"minecraft:pig/sound_variant": 95,
|
|
75
|
+
"minecraft:pig/variant": 94,
|
|
76
|
+
"minecraft:pot_decorations": 74,
|
|
77
|
+
"minecraft:potion_contents": 51,
|
|
78
|
+
"minecraft:potion_duration_scale": 52,
|
|
79
|
+
"minecraft:profile": 70,
|
|
80
|
+
"minecraft:provides_banner_patterns": 65,
|
|
81
|
+
"minecraft:provides_trim_material": 62,
|
|
82
|
+
"minecraft:rabbit/variant": 93,
|
|
83
|
+
"minecraft:rarity": 12,
|
|
84
|
+
"minecraft:recipes": 66,
|
|
85
|
+
"minecraft:repair_cost": 19,
|
|
86
|
+
"minecraft:repairable": 33,
|
|
87
|
+
"minecraft:salmon/size": 87,
|
|
88
|
+
"minecraft:sheep/color": 109,
|
|
89
|
+
"minecraft:shulker/color": 110,
|
|
90
|
+
"minecraft:stored_enchantments": 42,
|
|
91
|
+
"minecraft:sulfur_cube_content": 78,
|
|
92
|
+
"minecraft:suspicious_stew_effects": 53,
|
|
93
|
+
"minecraft:swing_animation": 40,
|
|
94
|
+
"minecraft:tool": 28,
|
|
95
|
+
"minecraft:tooltip_display": 18,
|
|
96
|
+
"minecraft:tooltip_style": 35,
|
|
97
|
+
"minecraft:trim": 56,
|
|
98
|
+
"minecraft:tropical_fish/base_color": 90,
|
|
99
|
+
"minecraft:tropical_fish/pattern": 89,
|
|
100
|
+
"minecraft:tropical_fish/pattern_color": 91,
|
|
101
|
+
"minecraft:unbreakable": 4,
|
|
102
|
+
"minecraft:use_cooldown": 26,
|
|
103
|
+
"minecraft:use_effects": 5,
|
|
104
|
+
"minecraft:use_remainder": 25,
|
|
105
|
+
"minecraft:villager/variant": 82,
|
|
106
|
+
"minecraft:weapon": 29,
|
|
107
|
+
"minecraft:wolf/collar": 85,
|
|
108
|
+
"minecraft:wolf/sound_variant": 84,
|
|
109
|
+
"minecraft:wolf/variant": 83,
|
|
110
|
+
"minecraft:writable_book_content": 54,
|
|
111
|
+
"minecraft:written_book_content": 55,
|
|
112
|
+
"minecraft:zombie_nautilus/variant": 100
|
|
113
|
+
}
|
|
@@ -958,13 +958,11 @@
|
|
|
958
958
|
"slot_data": {
|
|
959
959
|
"type": "prefixed_array",
|
|
960
960
|
"subType": {
|
|
961
|
-
"type": "
|
|
962
|
-
"comment": "Slot"
|
|
961
|
+
"type": "slot"
|
|
963
962
|
}
|
|
964
963
|
},
|
|
965
964
|
"carried_item": {
|
|
966
|
-
"type": "
|
|
967
|
-
"comment": "Slot"
|
|
965
|
+
"type": "slot"
|
|
968
966
|
}
|
|
969
967
|
}
|
|
970
968
|
},
|
|
@@ -997,8 +995,7 @@
|
|
|
997
995
|
"type": "short"
|
|
998
996
|
},
|
|
999
997
|
"slot_data": {
|
|
1000
|
-
"type": "
|
|
1001
|
-
"comment": "Slot"
|
|
998
|
+
"type": "slot"
|
|
1002
999
|
}
|
|
1003
1000
|
}
|
|
1004
1001
|
},
|
|
@@ -1774,8 +1771,7 @@
|
|
|
1774
1771
|
"comment": "Trade Item"
|
|
1775
1772
|
},
|
|
1776
1773
|
"output_item": {
|
|
1777
|
-
"type": "
|
|
1778
|
-
"comment": "Slot"
|
|
1774
|
+
"type": "slot"
|
|
1779
1775
|
},
|
|
1780
1776
|
"input_item_2": {
|
|
1781
1777
|
"type": "prefixed_optional",
|
|
@@ -2657,8 +2653,7 @@
|
|
|
2657
2653
|
"id": 96,
|
|
2658
2654
|
"structure": {
|
|
2659
2655
|
"carried_item": {
|
|
2660
|
-
"type": "
|
|
2661
|
-
"comment": "Slot"
|
|
2656
|
+
"type": "slot"
|
|
2662
2657
|
}
|
|
2663
2658
|
}
|
|
2664
2659
|
},
|
|
@@ -2749,8 +2744,7 @@
|
|
|
2749
2744
|
}
|
|
2750
2745
|
},
|
|
2751
2746
|
"item": {
|
|
2752
|
-
"type": "
|
|
2753
|
-
"comment": "Slot"
|
|
2747
|
+
"type": "slot"
|
|
2754
2748
|
}
|
|
2755
2749
|
}
|
|
2756
2750
|
}
|
|
@@ -2819,8 +2813,7 @@
|
|
|
2819
2813
|
"type": "var_int"
|
|
2820
2814
|
},
|
|
2821
2815
|
"slot_data": {
|
|
2822
|
-
"type": "
|
|
2823
|
-
"comment": "Slot"
|
|
2816
|
+
"type": "slot"
|
|
2824
2817
|
}
|
|
2825
2818
|
}
|
|
2826
2819
|
},
|
|
@@ -4426,8 +4419,7 @@
|
|
|
4426
4419
|
"type": "short"
|
|
4427
4420
|
},
|
|
4428
4421
|
"clicked_item": {
|
|
4429
|
-
"type": "
|
|
4430
|
-
"comment": "Slot"
|
|
4422
|
+
"type": "slot"
|
|
4431
4423
|
}
|
|
4432
4424
|
}
|
|
4433
4425
|
},
|