mc-assets 0.2.64 → 0.2.66
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 +2 -2
- package/dist/atlasCreator.d.ts +1 -1
- package/dist/atlasParser.d.ts +14 -3
- package/dist/atlasParser.js +12 -4
- package/dist/blockStatesModels.json +13580 -4723
- package/dist/blocksAtlasLatest.png +0 -0
- package/dist/blocksAtlases.json +146 -1
- package/dist/itemDefinitions.json +1444 -502
- package/dist/itemDefinitions.test.js +1 -1
- package/dist/itemsAtlasLatest.png +0 -0
- package/dist/itemsAtlases.json +105 -0
- package/dist/other-textures/latest/entity/chest/copper.png +0 -0
- package/dist/other-textures/latest/entity/chest/copper_exposed.png +0 -0
- package/dist/other-textures/latest/entity/chest/copper_exposed_left.png +0 -0
- package/dist/other-textures/latest/entity/chest/copper_exposed_right.png +0 -0
- package/dist/other-textures/latest/entity/chest/copper_left.png +0 -0
- package/dist/other-textures/latest/entity/chest/copper_oxidized.png +0 -0
- package/dist/other-textures/latest/entity/chest/copper_oxidized_left.png +0 -0
- package/dist/other-textures/latest/entity/chest/copper_oxidized_right.png +0 -0
- package/dist/other-textures/latest/entity/chest/copper_right.png +0 -0
- package/dist/other-textures/latest/entity/chest/copper_weathered.png +0 -0
- package/dist/other-textures/latest/entity/chest/copper_weathered_left.png +0 -0
- package/dist/other-textures/latest/entity/chest/copper_weathered_right.png +0 -0
- package/dist/other-textures/latest/entity/copper_golem/copper_golem.png +0 -0
- package/dist/other-textures/latest/entity/copper_golem/copper_golem_eyes.png +0 -0
- package/dist/other-textures/latest/entity/copper_golem/exposed_copper_golem.png +0 -0
- package/dist/other-textures/latest/entity/copper_golem/exposed_copper_golem_eyes.png +0 -0
- package/dist/other-textures/latest/entity/copper_golem/oxidized_copper_golem.png +0 -0
- package/dist/other-textures/latest/entity/copper_golem/oxidized_copper_golem_eyes.png +0 -0
- package/dist/other-textures/latest/entity/copper_golem/weathered_copper_golem.png +0 -0
- package/dist/other-textures/latest/entity/copper_golem/weathered_copper_golem_eyes.png +0 -0
- package/dist/other-textures/latest/entity/equipment/horse_body/copper.png +0 -0
- package/dist/other-textures/latest/entity/equipment/humanoid/copper.png +0 -0
- package/dist/other-textures/latest/entity/equipment/humanoid_leggings/copper.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_angry.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_ashen.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_ashen_angry.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_ashen_tame.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_chestnut.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_chestnut_angry.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_chestnut_tame.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_rusty.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_rusty_tame.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_snowy.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_snowy_tame.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_tame.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_woods_angry.png +0 -0
- package/dist/other-textures/latest/entity/wolf/wolf_woods_tame.png +0 -0
- package/dist/other-textures/latest/environment/end_flash.png +0 -0
- package/dist/other-textures/latest/gui/container/villager.png +0 -0
- package/dist/other-textures/latest/gui/sprites/hud/locator_bar_background.png +0 -0
- package/dist/other-textures/latest/gui/sprites/icon/music_notes.png +0 -0
- package/dist/other-textures/latest/trims/color_palettes/copper_darker.png +0 -0
- package/dist/particlesAtlasLatest.png +0 -0
- package/dist/particlesAtlases.json +5 -0
- package/dist/worldBlockProvider.d.ts +2 -2
- package/package.json +1 -1
package/README.MD
CHANGED
|
@@ -27,9 +27,9 @@ 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): 5.
|
|
30
|
+
All blockstates + models + all atlas textures for all versions bundled with rsbuild (uncompressed): 5.12 MB.
|
|
31
31
|
|
|
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, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5-pre2, 1.21.5-pre3, 1.21.5-rc1, 1.21.5-rc2, 1.21.5, 1.21.6-pre1, 1.21.6-pre2, 1.21.6-pre3, 1.21.6-rc1, 1.21.6, 1.21.7-rc2, 1.21.7, 1.21.8-rc1, 1.21.8.
|
|
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, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5-pre2, 1.21.5-pre3, 1.21.5-rc1, 1.21.5-rc2, 1.21.5, 1.21.6-pre1, 1.21.6-pre2, 1.21.6-pre3, 1.21.6-rc1, 1.21.6, 1.21.7-rc2, 1.21.7, 1.21.8-rc1, 1.21.8, 1.21.9-pre2, 1.21.9-pre4.
|
|
33
33
|
|
|
34
34
|
<details>
|
|
35
35
|
<summary>Included Block Entities (Additional Block Models) (138):</summary>
|
package/dist/atlasCreator.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type AtlasCreatorOptions = {
|
|
|
19
19
|
input: string[];
|
|
20
20
|
getLoadedImage: (name: any) => {
|
|
21
21
|
contents?: string;
|
|
22
|
-
image?: HTMLImageElement;
|
|
22
|
+
image?: HTMLImageElement | HTMLCanvasElement;
|
|
23
23
|
tileWidthMult?: number;
|
|
24
24
|
useOriginalSize?: boolean;
|
|
25
25
|
renderWidth?: number;
|
package/dist/atlasParser.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ interface ItemsAtlases {
|
|
|
21
21
|
latest: ItemsAtlasesOutputJson;
|
|
22
22
|
legacy?: ItemsAtlasesOutputJson;
|
|
23
23
|
}
|
|
24
|
+
export interface AtlasParserTransferrable {
|
|
25
|
+
}
|
|
24
26
|
type StoreType = Texture & {
|
|
25
27
|
imageType: 'latest' | 'legacy';
|
|
26
28
|
version: string;
|
|
@@ -32,21 +34,30 @@ export declare class AtlasParser {
|
|
|
32
34
|
legacyImage?: string | undefined;
|
|
33
35
|
atlasStore: VersionedStore<StoreType>;
|
|
34
36
|
atlasHasLegacyImage: boolean;
|
|
37
|
+
static getTextureInfo(atlasStore: VersionedStore<StoreType>, itemsAtlases: ItemsAtlases, itemName: string, version?: string): {
|
|
38
|
+
su: number;
|
|
39
|
+
sv: number;
|
|
40
|
+
u: number;
|
|
41
|
+
v: number;
|
|
42
|
+
tileIndex: number;
|
|
43
|
+
imageType: "latest" | "legacy";
|
|
44
|
+
version: string;
|
|
45
|
+
} | undefined;
|
|
35
46
|
constructor(atlasJson: any, latestImage: string, legacyImage?: string | undefined);
|
|
36
47
|
get atlas(): ItemsAtlases;
|
|
37
48
|
getTextureInfo(itemName: string, version?: string): {
|
|
38
|
-
su: number;
|
|
39
|
-
sv: number;
|
|
40
49
|
/** @deprecated */
|
|
41
50
|
getLoadedImage: () => Promise<HTMLImageElement>;
|
|
42
51
|
getLoadedAtlasImage: () => Promise<HTMLImageElement>;
|
|
52
|
+
su: number;
|
|
53
|
+
sv: number;
|
|
43
54
|
u: number;
|
|
44
55
|
v: number;
|
|
45
56
|
tileIndex: number;
|
|
46
57
|
imageType: "latest" | "legacy";
|
|
47
58
|
version: string;
|
|
48
59
|
} | undefined;
|
|
49
|
-
makeNewAtlas(version: string, getCustomImage?: (itemName: string) => DataUrl | HTMLImageElement | boolean | void, _unusedTileSize?: number, getTextureSortRankOrTopTextures?: string[] | ((key: string) => number), addTextures?: string[], options?: Pick<AtlasCreatorOptions, 'needHorizontalIndexes' | 'getCanvas'>): Promise<{
|
|
60
|
+
makeNewAtlas(version: string, getCustomImage?: (itemName: string) => DataUrl | HTMLCanvasElement | HTMLImageElement | boolean | void, _unusedTileSize?: number, getTextureSortRankOrTopTextures?: string[] | ((key: string) => number), addTextures?: string[], options?: Pick<AtlasCreatorOptions, 'needHorizontalIndexes' | 'getCanvas'>): Promise<{
|
|
50
61
|
canvas: HTMLCanvasElement;
|
|
51
62
|
atlas: import("./atlasCreator").JsonAtlas;
|
|
52
63
|
readonly newAtlasParser: AtlasParser;
|
package/dist/atlasParser.js
CHANGED
|
@@ -7,6 +7,17 @@ export class AtlasParser {
|
|
|
7
7
|
legacyImage;
|
|
8
8
|
atlasStore;
|
|
9
9
|
atlasHasLegacyImage;
|
|
10
|
+
static getTextureInfo(atlasStore, itemsAtlases, itemName, version = 'latest') {
|
|
11
|
+
const info = atlasStore.get(version, itemName);
|
|
12
|
+
if (!info)
|
|
13
|
+
return;
|
|
14
|
+
const defaultSuSv = (info.imageType === 'latest' ? itemsAtlases.latest : itemsAtlases.legacy).suSv;
|
|
15
|
+
return {
|
|
16
|
+
...info,
|
|
17
|
+
su: info?.su ?? defaultSuSv,
|
|
18
|
+
sv: info?.sv ?? defaultSuSv,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
10
21
|
constructor(atlasJson, latestImage, legacyImage) {
|
|
11
22
|
this.atlasJson = atlasJson;
|
|
12
23
|
this.latestImage = latestImage;
|
|
@@ -32,14 +43,11 @@ export class AtlasParser {
|
|
|
32
43
|
return this.atlasJson;
|
|
33
44
|
}
|
|
34
45
|
getTextureInfo(itemName, version = 'latest') {
|
|
35
|
-
const info = this.atlasStore.
|
|
46
|
+
const info = AtlasParser.getTextureInfo(this.atlasStore, this.atlas, itemName, version);
|
|
36
47
|
if (!info)
|
|
37
48
|
return;
|
|
38
|
-
const defaultSuSv = (info.imageType === 'latest' ? this.atlas.latest : this.atlas.legacy).suSv;
|
|
39
49
|
return {
|
|
40
50
|
...info,
|
|
41
|
-
su: info?.su ?? defaultSuSv,
|
|
42
|
-
sv: info?.sv ?? defaultSuSv,
|
|
43
51
|
/** @deprecated */
|
|
44
52
|
getLoadedImage: async () => {
|
|
45
53
|
return await getLoadedImage(info.imageType === 'latest' ? this.latestImage : this.legacyImage);
|