mc-assets 0.2.5 → 0.2.7
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 +1 -1
- package/dist/assetsParser.js +12 -1
- package/dist/blockStatesModels.json +903 -3435
- package/dist/blocksAtlasLatest.png +0 -0
- package/dist/blocksAtlases.json +1419 -1414
- package/dist/itemsAtlasLatest.png +0 -0
- package/dist/itemsAtlases.json +3925 -2775
- package/dist/itemsRenderer.d.ts +8 -8
- package/dist/itemsRenderer.js +10 -5
- package/dist/types.d.ts +1 -0
- package/package.json +2 -2
package/README.MD
CHANGED
|
@@ -27,7 +27,7 @@ For contributing & building instructions see [building](#building) section.
|
|
|
27
27
|
> Tested on Node.js 18 and above.
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
All blockstates + models + all atlas textures for all versions bundled with rsbuild (uncompressed): 4.
|
|
30
|
+
All blockstates + models + all atlas textures for all versions bundled with rsbuild (uncompressed): 4.83 MB.
|
|
31
31
|
|
|
32
32
|
This packages includes versions for: 1.7.10, 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.8.9, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.10, 1.10.1, 1.10.2, 1.11, 1.11.1, 1.11.2, 1.12, 1.12.1, 1.12.2, 1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21.
|
|
33
33
|
|
package/dist/assetsParser.js
CHANGED
|
@@ -55,6 +55,9 @@ export class AssetsParser {
|
|
|
55
55
|
if (properties.OR) {
|
|
56
56
|
return properties.OR.some((or) => matchProperties(block, or));
|
|
57
57
|
}
|
|
58
|
+
if (properties.AND) {
|
|
59
|
+
return properties.AND.every((and) => matchProperties(block, and));
|
|
60
|
+
}
|
|
58
61
|
for (const prop in properties) {
|
|
59
62
|
if (typeof properties[prop] !== 'string')
|
|
60
63
|
properties[prop] = String(properties[prop]);
|
|
@@ -149,7 +152,15 @@ export class AssetsParser {
|
|
|
149
152
|
}
|
|
150
153
|
if (model.textures) {
|
|
151
154
|
this.resolvedModel.textures ??= {};
|
|
152
|
-
Object.
|
|
155
|
+
for (let [key, value] of Object.entries(model.textures)) {
|
|
156
|
+
if (value.includes('#')) {
|
|
157
|
+
const key = value.split('/').at(-1).slice(1);
|
|
158
|
+
if (this.resolvedModel.textures[key]) {
|
|
159
|
+
value = this.resolvedModel.textures[key];
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
this.resolvedModel.textures[key] = value;
|
|
163
|
+
}
|
|
153
164
|
}
|
|
154
165
|
if (model.elements) {
|
|
155
166
|
this.resolvedModel.elements ??= [];
|