minecraft-data 3.9.0 → 3.10.2
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/.github/workflows/ci.yml +1 -6
- package/.github/workflows/md-release.yml +5 -4
- package/.github/workflows/npm-publish.yml +1 -2
- package/.github/workflows/trigger.yml +2 -2
- package/README.md +14 -15
- package/data.js +22 -1
- package/doc/api.md +460 -167
- package/doc/history.md +410 -176
- package/index.d.ts +152 -125
- package/lib/indexes.js +0 -2
- package/lib/loader.js +1 -2
- package/minecraft-data/README.md +1 -1
- package/minecraft-data/data/bedrock/1.16.201/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.16.201/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.16.210/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.16.210/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.16.220/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.16.220/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.17.0/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.17.0/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.17.10/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.17.10/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.17.30/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.17.30/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.17.40/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.17.40/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.18.0/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.18.0/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.18.11/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.18.11/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.18.30/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.18.30/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.19.1/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.19.1/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.19.10/proto.yml +3680 -0
- package/minecraft-data/data/bedrock/1.19.10/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.19.10/types.yml +1955 -0
- package/minecraft-data/data/bedrock/1.19.20/protocol.json +10644 -0
- package/minecraft-data/data/bedrock/1.19.20/version.json +6 -0
- package/minecraft-data/data/bedrock/common/protocolVersions.json +6 -0
- package/minecraft-data/data/bedrock/common/versions.json +2 -1
- package/minecraft-data/data/bedrock/latest/proto.yml +55 -7
- package/minecraft-data/data/bedrock/latest/types.yml +7 -0
- package/minecraft-data/data/dataPaths.json +22 -1
- package/minecraft-data/data/pc/1.19/protocol.json +1 -5
- package/minecraft-data/data/pc/1.7/protocol.json +1 -1
- package/minecraft-data/data/pc/1.8/protocol.json +1 -1
- package/minecraft-data/data/pc/15w40b/protocol.json +1 -1
- package/minecraft-data/data/pc/common/protocolVersions.json +35 -0
- package/minecraft-data/doc/history.md +14 -0
- package/package.json +1 -1
- package/typings/generate-typings.js +22 -14
- package/typings/index-template.d.ts +160 -133
- package/typings/test-typings.ts +24 -29
|
@@ -1,170 +1,197 @@
|
|
|
1
|
-
// This will interface will merge with the generated one
|
|
2
1
|
export interface Version {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
// Returns true if the current version is greater than or equal to the `other` version's dataVersion
|
|
3
|
+
['>='](other: string): boolean
|
|
4
|
+
// Returns true if the current version is greater than the `other` version's dataVersion
|
|
5
|
+
['>'](other: string): boolean
|
|
6
|
+
// Returns true if the current version is less than the `other` version's dataVersion
|
|
7
|
+
['<'](other: string): boolean
|
|
8
|
+
// Returns true if the current version is less than than or equal to the `other` version's dataVersion
|
|
9
|
+
['<='](other: string): boolean
|
|
10
|
+
// Returns true if the current version is equal to the `other` version's dataVersion
|
|
11
|
+
['=='](other: string): boolean
|
|
12
|
+
type: 'pc' | 'bedrock'
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
export interface VersionSet {
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
pc: { [version: string]: Version }
|
|
17
|
+
bedrock: { [version: string]: Version }
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
export interface SupportedVersions {
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
pc: string[]
|
|
22
|
+
bedrock: string[]
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
export interface Schemas {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
26
|
+
biomes: object
|
|
27
|
+
blocks: object
|
|
28
|
+
effects: object
|
|
29
|
+
entities: object
|
|
30
|
+
instruments: object
|
|
31
|
+
items: object
|
|
32
|
+
materials: object
|
|
33
|
+
protocol: object
|
|
34
|
+
protocolVersions: object
|
|
35
|
+
recipes: object
|
|
36
|
+
version: object
|
|
37
|
+
windows: object
|
|
38
|
+
foods: object
|
|
39
|
+
blockLoot: object
|
|
40
|
+
entityLoot: object
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
export interface LoginPacket {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
44
|
+
entityId: number
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* introduced in Minecraft 1.16.2
|
|
48
|
+
*/
|
|
49
|
+
isHardcore?: boolean
|
|
50
|
+
|
|
51
|
+
gameMode: number
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Introduced in Minecraft 1.17
|
|
55
|
+
*/
|
|
56
|
+
previousGameMode?: number
|
|
57
|
+
/**
|
|
58
|
+
* Introduced in Minecraft 1.17
|
|
59
|
+
*/
|
|
60
|
+
worldNames?: string[]
|
|
61
|
+
/**
|
|
62
|
+
* Introduced in Minecraft 1.17
|
|
63
|
+
*/
|
|
64
|
+
dimensionCodec?: object
|
|
65
|
+
|
|
66
|
+
dimension: object
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Introduced in Minecraft 1.17
|
|
70
|
+
*/
|
|
71
|
+
worldName?: string
|
|
72
|
+
|
|
73
|
+
hashedSeed: number
|
|
74
|
+
maxPlayers: number
|
|
75
|
+
viewDistance: number
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Introduced in Minecraft 1.18
|
|
79
|
+
*/
|
|
80
|
+
simulationDistance?: number
|
|
81
|
+
|
|
82
|
+
reducedDebugInfo: boolean
|
|
83
|
+
enableRespawnScreen: boolean
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Introduced in Minecraft 1.17
|
|
87
|
+
*/
|
|
88
|
+
isDebug?: boolean
|
|
89
|
+
/**
|
|
90
|
+
* Introduced in Minecraft 1.17
|
|
91
|
+
*/
|
|
92
|
+
isFlat?: boolean
|
|
94
93
|
}
|
|
95
94
|
|
|
96
95
|
export interface IndexedData {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
96
|
+
isOlderThan(version: string): boolean
|
|
97
|
+
isNewerOrEqualTo(version: string): boolean
|
|
98
|
+
|
|
99
|
+
blocks: { [id: number]: Block }
|
|
100
|
+
blocksByName: { [name: string]: Block }
|
|
101
|
+
blocksByStateId: { [id: number]: Block }
|
|
102
|
+
blocksArray: Block[]
|
|
103
|
+
/**
|
|
104
|
+
* Bedrock edition only
|
|
105
|
+
*/
|
|
106
|
+
blockStates?: { name: string; states: object; version: number }[]
|
|
107
|
+
blockCollisionShapes: { blocks: { [name: string]: number[] }; shapes: { [id: number]: [number[]] } }
|
|
102
108
|
|
|
103
|
-
|
|
109
|
+
loginPacket: LoginPacket
|
|
104
110
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
111
|
+
items: { [id: number]: Item }
|
|
112
|
+
itemsByName: { [name: string]: Item }
|
|
113
|
+
itemsArray: Item[]
|
|
108
114
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
foodsByFoodPoints: { [foodPoints: number]: Food; };
|
|
113
|
-
foodsBySaturation: { [saturation: number]: Food; };
|
|
115
|
+
foods: { [id: number]: Food }
|
|
116
|
+
foodsByName: { [name: string]: Food }
|
|
117
|
+
foodsArray: Food[]
|
|
114
118
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
biomes: { [id: number]: Biome }
|
|
120
|
+
biomesArray: Biome[]
|
|
121
|
+
biomesByName: { [name: string]: Biome }
|
|
118
122
|
|
|
119
|
-
|
|
123
|
+
recipes: { [id: number]: Recipe[] }
|
|
120
124
|
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
instruments: { [id: number]: Instrument }
|
|
126
|
+
instrumentsArray: Instrument[]
|
|
123
127
|
|
|
124
|
-
|
|
128
|
+
materials: { [name: string]: Material }
|
|
125
129
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
+
mobs: { [id: number]: Entity }
|
|
131
|
+
objects: { [id: number]: Entity }
|
|
132
|
+
entities: { [id: number]: Entity }
|
|
133
|
+
entitiesByName: { [name: string]: Entity }
|
|
134
|
+
entitiesArray: Entity[]
|
|
130
135
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
136
|
+
enchantments: { [id: number]: Enchantment }
|
|
137
|
+
enchantmentsByName: { [name: string]: Enchantment }
|
|
138
|
+
enchantmentsArray: Enchantment[]
|
|
134
139
|
|
|
135
|
-
|
|
136
|
-
|
|
140
|
+
/**
|
|
141
|
+
* Bedrock edition only
|
|
142
|
+
*/
|
|
143
|
+
defaultSkin?: object
|
|
137
144
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
145
|
+
protocol: object
|
|
146
|
+
protocolComments: object
|
|
147
|
+
/**
|
|
148
|
+
* Bedrock edition only
|
|
149
|
+
*/
|
|
150
|
+
protocolYaml?: string[]
|
|
141
151
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
152
|
+
windows: { [id: string]: Window }
|
|
153
|
+
windowsByName: { [name: string]: Window }
|
|
154
|
+
windowsArray: Window[]
|
|
145
155
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
156
|
+
effects: { [id: number]: Effect }
|
|
157
|
+
effectsByName: { [name: string]: Effect }
|
|
158
|
+
effectsArray: Effect[]
|
|
149
159
|
|
|
150
|
-
|
|
160
|
+
particles: { [id: number]: Particle }
|
|
161
|
+
particlesByName: { [name: string]: Particle }
|
|
162
|
+
particlesArray: Particle[]
|
|
151
163
|
|
|
152
|
-
|
|
164
|
+
attributes: { [resource: string]: string }
|
|
165
|
+
attributesByName: { [name: string]: string }
|
|
166
|
+
attributesArray: []
|
|
153
167
|
|
|
154
|
-
|
|
168
|
+
commands: {}
|
|
155
169
|
|
|
156
|
-
|
|
157
|
-
blockLootByName: { [name: string]: BlockLoot; };
|
|
170
|
+
version: Version
|
|
158
171
|
|
|
159
|
-
|
|
160
|
-
|
|
172
|
+
type: 'pc' | 'bedrock'
|
|
173
|
+
|
|
174
|
+
language: { [key: string]: string }
|
|
175
|
+
|
|
176
|
+
blockLoot: { [id: number]: BlockLoot }
|
|
177
|
+
blockLootByName: { [name: string]: BlockLoot }
|
|
178
|
+
|
|
179
|
+
entityLoot: { [id: number]: EntityLoot }
|
|
180
|
+
entityLootByName: { [name: string]: EntityLoot }
|
|
181
|
+
|
|
182
|
+
mapIcons: { [id: number]: MapIcon }
|
|
183
|
+
mapIconsByName: { [name: string]: MapIcon }
|
|
184
|
+
mapIconsArray: MapIcon[]
|
|
185
|
+
|
|
186
|
+
tints: Tints
|
|
161
187
|
}
|
|
162
188
|
|
|
163
189
|
const versions: {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
const versionsByMinecraftVersion: VersionSet
|
|
167
|
-
const preNettyVersionsByProtocolVersion: VersionSet
|
|
168
|
-
const postNettyVersionsByProtocolVersion: VersionSet
|
|
169
|
-
const supportedVersions: SupportedVersions
|
|
170
|
-
const
|
|
190
|
+
[key in keyof SupportedVersions]: Version[]
|
|
191
|
+
}
|
|
192
|
+
const versionsByMinecraftVersion: VersionSet
|
|
193
|
+
const preNettyVersionsByProtocolVersion: VersionSet
|
|
194
|
+
const postNettyVersionsByProtocolVersion: VersionSet
|
|
195
|
+
const supportedVersions: SupportedVersions
|
|
196
|
+
const legacy: { pc: { blocks: { [id: string]: string } } }
|
|
197
|
+
const schemas: Schemas
|
package/typings/test-typings.ts
CHANGED
|
@@ -1,45 +1,40 @@
|
|
|
1
|
-
import getMcData = require('../')
|
|
2
|
-
const mcData = getMcData('1.8.8')
|
|
3
|
-
import { IndexedData } from '../'
|
|
1
|
+
import getMcData = require('../')
|
|
2
|
+
const mcData = getMcData('1.8.8')
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
console.log(mcData.blocksByName['stone'])
|
|
5
|
+
console.log(mcData.windows['minecraft:brewing_stand'])
|
|
6
|
+
console.log(mcData.version)
|
|
7
|
+
console.log(mcData.effectsByName['Haste'])
|
|
8
8
|
|
|
9
|
-
console.log(mcData.
|
|
10
|
-
console.log(mcData.
|
|
11
|
-
console.log(mcData.version);
|
|
12
|
-
console.log(mcData.effectsByName['Haste']);
|
|
9
|
+
console.log(mcData.mobs[62])
|
|
10
|
+
console.log(mcData.objects[62])
|
|
13
11
|
|
|
14
|
-
console.log(
|
|
15
|
-
console.log(mcData.objects[62]);
|
|
12
|
+
console.log(getMcData.versionsByMinecraftVersion['pc']['1.8.8'])
|
|
16
13
|
|
|
17
|
-
console.log(getMcData.versionsByMinecraftVersion['pc']['
|
|
14
|
+
console.log(getMcData.versionsByMinecraftVersion['pc']['15w40b'])
|
|
18
15
|
|
|
19
|
-
console.log(getMcData.
|
|
16
|
+
console.log(getMcData.preNettyVersionsByProtocolVersion['pc'][47])
|
|
20
17
|
|
|
21
|
-
console.log(getMcData.
|
|
18
|
+
console.log(getMcData.postNettyVersionsByProtocolVersion['pc'][47][0])
|
|
22
19
|
|
|
23
|
-
console.log(getMcData
|
|
20
|
+
console.log(getMcData(47).version)
|
|
24
21
|
|
|
25
|
-
console.log(getMcData(
|
|
22
|
+
console.log(getMcData('1.8').version)
|
|
26
23
|
|
|
27
|
-
console.log(getMcData('
|
|
24
|
+
console.log(getMcData('15w40b').version)
|
|
28
25
|
|
|
29
|
-
console.log(getMcData('
|
|
26
|
+
console.log(getMcData('0.30c').version)
|
|
30
27
|
|
|
31
|
-
console.log(getMcData('
|
|
28
|
+
console.log(getMcData('bedrock_0.14').version)
|
|
32
29
|
|
|
33
|
-
console.log(getMcData('
|
|
30
|
+
console.log(getMcData('pc_1.9').blocksByName['dirt'])
|
|
31
|
+
console.log(getMcData('bedrock_0.14').blocksByName['podzol'])
|
|
32
|
+
console.log(getMcData('bedrock_0.14').type)
|
|
34
33
|
|
|
35
|
-
console.log(getMcData('
|
|
36
|
-
console.log(getMcData('bedrock_0.14').blocksByName['podzol']);
|
|
37
|
-
console.log(getMcData('bedrock_0.14').type);
|
|
34
|
+
console.log(getMcData('1.8').enchantments[5])
|
|
38
35
|
|
|
39
|
-
console.log(getMcData
|
|
36
|
+
console.log(getMcData.supportedVersions.pc)
|
|
40
37
|
|
|
41
|
-
console.log(getMcData.
|
|
38
|
+
console.log(getMcData.schemas.blocks)
|
|
42
39
|
|
|
43
|
-
console.log(getMcData.
|
|
44
|
-
|
|
45
|
-
console.log(getMcData('1.12').language['options.sensitivity.max']);
|
|
40
|
+
console.log(getMcData('1.12').language['options.sensitivity.max'])
|