minecraft-data 3.78.0 → 3.80.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/data.js +78 -2
- package/doc/history.md +8 -0
- package/index.d.ts +3 -0
- package/minecraft-data/README.md +2 -2
- package/minecraft-data/data/bedrock/1.21.20/proto.yml +2 -2
- package/minecraft-data/data/bedrock/1.21.20/protocol.json +2 -2
- package/minecraft-data/data/bedrock/1.21.20/types.yml +1 -1
- package/minecraft-data/data/bedrock/1.21.30/proto.yml +2 -2
- package/minecraft-data/data/bedrock/1.21.30/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.21.42/proto.yml +4337 -0
- package/minecraft-data/data/bedrock/1.21.42/protocol.json +3 -3
- package/minecraft-data/data/bedrock/1.21.42/types.yml +2422 -0
- package/minecraft-data/data/bedrock/1.21.50/protocol.json +13034 -0
- package/minecraft-data/data/bedrock/1.21.50/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 +79 -3
- package/minecraft-data/data/bedrock/latest/types.yml +20 -3
- package/minecraft-data/data/dataPaths.json +79 -3
- package/minecraft-data/data/pc/1.20.5/proto.yml +5 -34
- package/minecraft-data/data/pc/1.20.5/protocol.json +26 -129
- package/minecraft-data/data/pc/1.21/version.json +6 -0
- package/minecraft-data/data/pc/1.21.1/attributes.json +219 -0
- package/minecraft-data/data/pc/1.21.1/proto.yml +3534 -0
- package/minecraft-data/data/pc/1.21.1/protocol.json +55 -51
- package/minecraft-data/data/pc/1.21.3/attributes.json +226 -0
- package/minecraft-data/data/pc/1.21.3/biomes.json +652 -0
- package/minecraft-data/data/pc/1.21.3/blockCollisionShapes.json +137701 -0
- package/minecraft-data/data/pc/1.21.3/blocks.json +40773 -0
- package/minecraft-data/data/pc/1.21.3/entities.json +4158 -0
- package/minecraft-data/data/pc/1.21.3/foods.json +402 -0
- package/minecraft-data/data/pc/1.21.3/items.json +9038 -0
- package/minecraft-data/data/pc/1.21.3/language.json +6974 -0
- package/minecraft-data/data/pc/1.21.3/materials.json +134 -0
- package/minecraft-data/data/pc/1.21.3/particles.json +446 -0
- package/minecraft-data/data/pc/1.21.3/protocol.json +9518 -0
- package/minecraft-data/data/pc/1.21.3/recipes.json +29693 -0
- package/minecraft-data/data/pc/1.21.3/sounds.json +6546 -0
- package/minecraft-data/data/pc/1.21.3/tints.json +465 -0
- package/minecraft-data/data/pc/1.21.3/version.json +6 -0
- package/minecraft-data/data/pc/common/features.json +5 -0
- package/minecraft-data/data/pc/common/protocolVersions.json +80 -0
- package/minecraft-data/data/pc/common/versions.json +3 -2
- package/minecraft-data/data/pc/latest/proto.yml +444 -603
- package/minecraft-data/doc/history.md +19 -0
- package/minecraft-data/tools/js/extractPcEntityMetadata.js +32 -10
- package/minecraft-data/tools/js/extractSlotComponents.js +23 -0
- package/package.json +1 -1
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## 3.80.0
|
|
2
|
+
* [Add bedrock 1.21.50 protocol data (#945)](https://github.com/PrismarineJS/minecraft-data/commit/b0c5492bc709673ba684e2fc0fe034ff069f9c50) (thanks @CreeperG16)
|
|
3
|
+
* [bedrock: fix serverbound_loading_screen malformed packet (#944)](https://github.com/PrismarineJS/minecraft-data/commit/9753666c64c00d1307e8ad93a3f1e1d74f3c7586) (thanks @JSbETms)
|
|
4
|
+
* [Add 1.21.3 to readme](https://github.com/PrismarineJS/minecraft-data/commit/6dc131a5b286da399ad0201ba977e7766cd3a5f6) (thanks @rom1504)
|
|
5
|
+
|
|
6
|
+
## 3.79.0
|
|
7
|
+
* [Java 1.21.3 Support (#936)](https://github.com/PrismarineJS/minecraft-data/commit/2442f47dc991c587c8090a9469170dd86cfa0ee4) (thanks @GroobleDierne)
|
|
8
|
+
* [Add 1.21.4 to pc protocolVersions.json](https://github.com/PrismarineJS/minecraft-data/commit/f88f2699c43dc48a12a2bdf5fd0109dc0ebc94b7) (thanks @github-actions[bot])
|
|
9
|
+
* [Add 1.21.4-rc3 to pc protocolVersions.json](https://github.com/PrismarineJS/minecraft-data/commit/e0e23d27777f5e9d64d9797fd5dd69616875cf63) (thanks @github-actions[bot])
|
|
10
|
+
* [Add 1.21.4-rc2 to pc protocolVersions.json](https://github.com/PrismarineJS/minecraft-data/commit/564c0a6c1765d1462a33b2f65f74c77bff50144c) (thanks @github-actions[bot])
|
|
11
|
+
* [Add 1.21.4-rc1 to pc protocolVersions.json](https://github.com/PrismarineJS/minecraft-data/commit/ccbaf7685dc1239ffbd2129a66ae76ea276d8bb4) (thanks @github-actions[bot])
|
|
12
|
+
* [Add 1.21.4-pre3 to pc protocolVersions.json](https://github.com/PrismarineJS/minecraft-data/commit/bb89a33f423dab1bf6f64a59aad12c547c369a99) (thanks @github-actions[bot])
|
|
13
|
+
* [Add 1.21.4-pre2 to pc protocolVersions.json](https://github.com/PrismarineJS/minecraft-data/commit/42a2f3806fd6a22f8ed79f98fb0757f906cf0266) (thanks @github-actions[bot])
|
|
14
|
+
* [Add 1.21.4-pre1 to pc protocolVersions.json](https://github.com/PrismarineJS/minecraft-data/commit/9cfa6ea955af24d6f481484ebe5d8221a2265421) (thanks @github-actions[bot])
|
|
15
|
+
* [Add 24w46a to pc protocolVersions.json](https://github.com/PrismarineJS/minecraft-data/commit/dd1c067ce05464831dd2855a06cf0ed74bc48cd0) (thanks @github-actions[bot])
|
|
16
|
+
* [Add 24w45a to pc protocolVersions.json](https://github.com/PrismarineJS/minecraft-data/commit/27e699e134a5dcc39c3a94ae7735d27f8ea3040f) (thanks @github-actions[bot])
|
|
17
|
+
* [Add 24w44a to pc protocolVersions.json](https://github.com/PrismarineJS/minecraft-data/commit/fc60c49b07c937cb31d617b7ec7e6abcf78a8ce8) (thanks @github-actions[bot])
|
|
18
|
+
* [Add 1.21 data (protocol compliant w/ 1.21.1) (#935)](https://github.com/PrismarineJS/minecraft-data/commit/f1130aea931b948d2ecaecf34ecfe0116bfd4172) (thanks @GroobleDierne)
|
|
19
|
+
|
|
1
20
|
## 3.78.0
|
|
2
21
|
* [Add pc 1.21.1 data (#925)](https://github.com/PrismarineJS/minecraft-data/commit/d56346a4e32defcd28d9ba6750957c12001e78d6) (thanks @extremeheat)
|
|
3
22
|
* [Add incrementedChatType feature (#932)](https://github.com/PrismarineJS/minecraft-data/commit/8ef58b15fec74c6a276d0c83cfc741d6fb4e072a) (thanks @SuperGamerTron)
|
|
@@ -2,8 +2,9 @@ const fs = require('fs')
|
|
|
2
2
|
const cp = require('child_process')
|
|
3
3
|
const { globSync } = require('glob')
|
|
4
4
|
const version = process.argv[2]
|
|
5
|
+
const mcdataVersion = process.argv[3] || process.argv[2]
|
|
5
6
|
if (!version) {
|
|
6
|
-
console.log('Usage: node extractEntityMetadata.js <
|
|
7
|
+
console.log('Usage: node extractEntityMetadata.js <codeVersion> [mcdataVersion]')
|
|
7
8
|
process.exit(1)
|
|
8
9
|
}
|
|
9
10
|
|
|
@@ -11,28 +12,49 @@ if (!fs.existsSync(version)) {
|
|
|
11
12
|
cp.execSync(`git clone -b client${version} https://github.com/extremeheat/extracted_minecraft_data.git ${version} --depth 1`, { stdio: 'inherit' })
|
|
12
13
|
}
|
|
13
14
|
|
|
15
|
+
// decompiler may either put static defs inline (static varname = value) or keep decl and def in seperate blocks (static varname; static{varname = val, ..}) so normalize it
|
|
16
|
+
function prepLines (raw) {
|
|
17
|
+
const lines = raw.replaceAll(' {\n', ' {;\n').split(';')
|
|
18
|
+
for (let i = 0; i < lines.length; i++) {
|
|
19
|
+
const line = lines[i].trim()
|
|
20
|
+
if (line.includes('static final') && !line.includes(' = ')) {
|
|
21
|
+
const varName = line.split(' ').pop()
|
|
22
|
+
for (let j = 0; j < lines.length; j++) {
|
|
23
|
+
const line2 = lines[j].trim()
|
|
24
|
+
if (line2.startsWith(varName + ' = ')) {
|
|
25
|
+
lines[i] = line.replace(varName, line2)
|
|
26
|
+
lines[j] = ''
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return lines
|
|
32
|
+
}
|
|
33
|
+
|
|
14
34
|
function getEntityTypes () {
|
|
15
35
|
const entityTypes = fs.readFileSync(`./${version}/client/net/minecraft/world/entity/EntityType.java`, 'utf8')
|
|
16
|
-
const entityTypesLines = entityTypes
|
|
36
|
+
const entityTypesLines = prepLines(entityTypes)
|
|
17
37
|
const classNameTo = {}
|
|
38
|
+
const nameToClass = {}
|
|
18
39
|
for (const line of entityTypesLines) {
|
|
19
40
|
if (line.includes('= register(')) {
|
|
20
41
|
// Given the line: public static final EntityType<Allay> ALLAY = register( "allay", EntityType.Builder.<Allay>of(Allay::new, MobCategory.CREATURE).sized(0.35F, 0.6F).clientTrackingRange(8).updateInterval(2) );
|
|
21
42
|
// we extract Allay and "allay"
|
|
22
|
-
const regex = line.match(/EntityType<(.*)> (.*) = register\(\W
|
|
43
|
+
const regex = line.match(/EntityType<(.*)> (.*) = register\(\W*"([a-z0-9_]+)"/)
|
|
23
44
|
if (regex) {
|
|
24
45
|
const [, type, , name] = regex
|
|
25
46
|
classNameTo[type] = name
|
|
47
|
+
nameToClass[name] = type
|
|
26
48
|
}
|
|
27
49
|
}
|
|
28
50
|
}
|
|
29
|
-
return classNameTo
|
|
51
|
+
return [classNameTo, nameToClass]
|
|
30
52
|
}
|
|
31
53
|
|
|
32
54
|
function getEntityMetadataSerializers () {
|
|
33
55
|
const output = []
|
|
34
56
|
const entityTypes = fs.readFileSync(`./${version}/client/net/minecraft/network/syncher/EntityDataSerializers.java`, 'utf8')
|
|
35
|
-
const entityTypesLines = entityTypes
|
|
57
|
+
const entityTypesLines = prepLines(entityTypes)
|
|
36
58
|
for (const line of entityTypesLines) {
|
|
37
59
|
if (line.includes('registerSerializer')) {
|
|
38
60
|
// From: registerSerializer(BYTE);
|
|
@@ -48,7 +70,7 @@ function getEntityMetadataSerializers () {
|
|
|
48
70
|
}
|
|
49
71
|
|
|
50
72
|
const serializers = getEntityMetadataSerializers()
|
|
51
|
-
const classNameToRegistryName = getEntityTypes()
|
|
73
|
+
const [classNameToRegistryName, entityNameToClass] = getEntityTypes()
|
|
52
74
|
|
|
53
75
|
const allEntityFiles = globSync(`${version}/**/entity/**/*.java`)
|
|
54
76
|
const allEntityFileCodes = Object.fromEntries(allEntityFiles.map(file => [
|
|
@@ -61,7 +83,7 @@ const metadatas = {}
|
|
|
61
83
|
|
|
62
84
|
for (const file in allEntityFileCodes) {
|
|
63
85
|
const code = allEntityFileCodes[file]
|
|
64
|
-
const lines = code
|
|
86
|
+
const lines = prepLines(code)
|
|
65
87
|
let lastClass
|
|
66
88
|
for (const line of lines) {
|
|
67
89
|
let lineWithoutGenerics = line.replace(/<.*>/g, '')
|
|
@@ -117,16 +139,16 @@ for (const key in classNameToRegistryName) {
|
|
|
117
139
|
}
|
|
118
140
|
|
|
119
141
|
function updateMcDataEntitiesJSON () {
|
|
120
|
-
const presentMcDataPath = `../../data/pc/${
|
|
142
|
+
const presentMcDataPath = `../../data/pc/${mcdataVersion}/entities.json`
|
|
121
143
|
const presentMcData = require(presentMcDataPath)
|
|
122
144
|
for (const entry of presentMcData) {
|
|
123
|
-
entry.metadataKeys = flat[entry.name].map(e => e[0].replace('DATA_', '').replace('_ID', '').replace('ID_', '').toLowerCase())
|
|
145
|
+
entry.metadataKeys = flat[classNameToRegistryName[entityNameToClass[entry.name]]].map(e => e[0].replace('DATA_', '').replace('_ID', '').replace('ID_', '').toLowerCase())
|
|
124
146
|
}
|
|
125
147
|
fs.writeFileSync(presentMcDataPath, JSON.stringify(presentMcData, null, 2))
|
|
126
148
|
}
|
|
127
149
|
|
|
128
150
|
function updateMcDataProtocolJSON () {
|
|
129
|
-
const presentMcDataPath = `../../data/pc/${
|
|
151
|
+
const presentMcDataPath = `../../data/pc/${mcdataVersion}/protocol.json`
|
|
130
152
|
const mcdata = require(presentMcDataPath)
|
|
131
153
|
const mapper = { type: 'varint', mappings: {} }
|
|
132
154
|
for (let i = 0; i < serializers.length; i++) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const fs = require('fs')
|
|
2
|
+
const cp = require('child_process')
|
|
3
|
+
const version = process.argv[2]
|
|
4
|
+
const extractTypes = process.argv[3] === '-types'
|
|
5
|
+
|
|
6
|
+
if (!version) {
|
|
7
|
+
console.log('Usage: node extractEntityMetadata.js <codeVersion> [-types]')
|
|
8
|
+
process.exit(1)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if (!fs.existsSync(version)) {
|
|
12
|
+
cp.execSync(`git clone -b client${version} https://github.com/extremeheat/extracted_minecraft_data.git ${version} --depth 1`, { stdio: 'inherit' })
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const componentsFile = fs.readFileSync(`./${version}/client/net/minecraft/core/component/DataComponents.java`, 'utf8')
|
|
16
|
+
const nameRe = /register\("(.+)",/gm
|
|
17
|
+
const typeRe = /\((.+?)\).*?;/gm
|
|
18
|
+
const nameMatches = componentsFile.matchAll(nameRe)
|
|
19
|
+
const typeMatches = componentsFile.matchAll(typeRe)
|
|
20
|
+
typeMatches.next()
|
|
21
|
+
for (const match of nameMatches) {
|
|
22
|
+
console.log(`- ${match[1]}${extractTypes ? ' : ' + typeMatches.next().value?.[1] : ''}`)
|
|
23
|
+
}
|