@terrafirmagreg-team/game 0.0.0-stage → 0.1.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.
Files changed (89) hide show
  1. package/package.json +58 -3
  2. package/src/components/entry/atlas-sprite.tsx +57 -0
  3. package/src/components/entry/copy-id-menu.tsx +55 -0
  4. package/src/components/entry/entry.tsx +229 -0
  5. package/src/components/entry/frame.tsx +32 -0
  6. package/src/components/entry/group.tsx +180 -0
  7. package/src/components/entry/icon/tabs.tsx +118 -0
  8. package/src/components/entry/icon.tsx +187 -0
  9. package/src/components/entry/list.tsx +70 -0
  10. package/src/components/entry/mc-text.tsx +92 -0
  11. package/src/components/entry/stack-count.tsx +14 -0
  12. package/src/components/entry/tooltip.tsx +129 -0
  13. package/src/components/mdx/item-icon.tsx +69 -0
  14. package/src/components/preview-icon.tsx +25 -0
  15. package/src/hooks/use-dump-location.ts +18 -0
  16. package/src/hooks/use-entry-context.ts +35 -0
  17. package/src/hooks/use-icon-source.ts +297 -0
  18. package/src/hooks/use-lang-map.ts +18 -0
  19. package/src/lib/dump/assets/atlas/dto.ts +49 -0
  20. package/src/lib/dump/assets/atlas/lookup.ts +206 -0
  21. package/src/lib/dump/assets/atlas/sprites.ts +130 -0
  22. package/src/lib/dump/assets/lang/load.ts +17 -0
  23. package/src/lib/dump/assets/lang/names.ts +244 -0
  24. package/src/lib/dump/assets/urls.ts +143 -0
  25. package/src/lib/dump/client/atlases.ts +83 -0
  26. package/src/lib/dump/client/dump.ts +188 -0
  27. package/src/lib/dump/client/groups.ts +31 -0
  28. package/src/lib/dump/client/keybinds.ts +11 -0
  29. package/src/lib/dump/client/mods.ts +16 -0
  30. package/src/lib/dump/client/registry.ts +125 -0
  31. package/src/lib/dump/client/tabs.ts +27 -0
  32. package/src/lib/dump/client/tags.ts +64 -0
  33. package/src/lib/dump/contract/kind.ts +61 -0
  34. package/src/lib/dump/contract/read.ts +77 -0
  35. package/src/lib/dump/contract/ref.ts +262 -0
  36. package/src/lib/dump/contract/text.ts +86 -0
  37. package/src/lib/dump/data/registry/dto.ts +56 -0
  38. package/src/lib/dump/data/registry/parse.ts +291 -0
  39. package/src/lib/dump/data/tab/dto.ts +13 -0
  40. package/src/lib/dump/data/tab/parse.ts +26 -0
  41. package/src/lib/dump/data/tag/dto.ts +7 -0
  42. package/src/lib/dump/data/tag/parse.ts +57 -0
  43. package/src/lib/dump/gen/data/guides/book.ts +56 -0
  44. package/src/lib/dump/gen/data/guides/category.ts +30 -0
  45. package/src/lib/dump/gen/data/guides/entry.ts +48 -0
  46. package/src/lib/dump/gen/data/models/model.ts +3 -0
  47. package/src/lib/dump/gen/data/quests/chapter.ts +126 -0
  48. package/src/lib/dump/gen/data/quests/chapter_groups.ts +11 -0
  49. package/src/lib/dump/gen/data/quests/data.ts +40 -0
  50. package/src/lib/dump/gen/data/recipes/recipe.ts +78 -0
  51. package/src/lib/dump/gen/index.ts +20 -0
  52. package/src/lib/dump/gen/keybinds.ts +3 -0
  53. package/src/lib/dump/gen/lang.ts +3 -0
  54. package/src/lib/dump/gen/manifest.ts +59 -0
  55. package/src/lib/dump/gen/registry/blocks.ts +60 -0
  56. package/src/lib/dump/gen/registry/entities.ts +49 -0
  57. package/src/lib/dump/gen/registry/fluids.ts +48 -0
  58. package/src/lib/dump/gen/registry/groups.ts +14 -0
  59. package/src/lib/dump/gen/registry/items.ts +51 -0
  60. package/src/lib/dump/gen/registry/recipe_categories.ts +64 -0
  61. package/src/lib/dump/gen/registry/recipes.ts +3 -0
  62. package/src/lib/dump/gen/registry/tabs.ts +46 -0
  63. package/src/lib/dump/gen/registry/tags.ts +11 -0
  64. package/src/lib/dump/json-reader.ts +231 -0
  65. package/src/lib/dump/manifest/dto.ts +11 -0
  66. package/src/lib/dump/manifest/parse.ts +167 -0
  67. package/src/lib/dump/mods/dto.ts +40 -0
  68. package/src/lib/dump/mods/index.ts +81 -0
  69. package/src/lib/dump/mods/load.ts +61 -0
  70. package/src/lib/dump/paths.ts +171 -0
  71. package/src/lib/dump/reader.ts +15 -0
  72. package/src/lib/entry/display.ts +4 -0
  73. package/src/lib/entry/entry.ts +57 -0
  74. package/src/lib/entry/formula.ts +226 -0
  75. package/src/lib/entry/href.ts +148 -0
  76. package/src/lib/entry/icon-load.ts +195 -0
  77. package/src/lib/entry/icon.ts +10 -0
  78. package/src/lib/entry/tooltip.ts +60 -0
  79. package/src/lib/preview.ts +18 -0
  80. package/src/lib/search.ts +31 -0
  81. package/src/lib/snbt.ts +246 -0
  82. package/src/locales/en_us.json +9 -0
  83. package/src/locales/ru_ru.json +9 -0
  84. package/src/locales.ts +5 -0
  85. package/src/types/entry.ts +52 -0
  86. package/styles/fonts.css +15 -0
  87. package/styles/tokens.css +15 -0
  88. package/styles.css +2 -0
  89. package/README.md +0 -3
@@ -0,0 +1,26 @@
1
+ import { asRecord, asString } from '@terrafirmagreg-team/game/lib/dump/contract/read';
2
+ import { asTaggedReference, compactRefId } from '@terrafirmagreg-team/game/lib/dump/contract/ref';
3
+ import { asDisplay } from '@terrafirmagreg-team/game/lib/dump/contract/text';
4
+ import type { DumpCreativeTab } from '@terrafirmagreg-team/game/lib/dump/data/tab/dto';
5
+
6
+ export function asTab(value: unknown): DumpCreativeTab | undefined {
7
+ const row = asRecord(value);
8
+ if (!row) return undefined;
9
+ const id = asString(row.id);
10
+ const display = asDisplay(row.display);
11
+ const name = display?.name;
12
+ if (!id || !name) return undefined;
13
+ const order =
14
+ typeof row.order === 'number' && Number.isFinite(row.order) ? row.order : 0;
15
+ const icon = asTaggedReference(row.icon);
16
+ return { id, order, display: { ...display, name }, ...(icon ? { icon } : {}) };
17
+ }
18
+
19
+ export function asTabItems(value: unknown): string[] {
20
+ const row = asRecord(value);
21
+ if (!row || !Array.isArray(row.items)) return [];
22
+ return row.items.flatMap((item) => {
23
+ const id = compactRefId(item);
24
+ return id ? [id] : [];
25
+ });
26
+ }
@@ -0,0 +1,7 @@
1
+ import type { TagEntry } from '@terrafirmagreg-team/game/lib/dump/gen';
2
+
3
+ export type DumpTag = Omit<TagEntry, 'members' | 'usedBy' | 'producedBy'> & {
4
+ members: string[];
5
+ usedBy: string[];
6
+ producedBy: string[];
7
+ };
@@ -0,0 +1,57 @@
1
+ import {
2
+ asEdgeList,
3
+ asRecord,
4
+ asString,
5
+ asStringList,
6
+ } from '@terrafirmagreg-team/game/lib/dump/contract/read';
7
+ import type { DumpTag } from '@terrafirmagreg-team/game/lib/dump/data/tag/dto';
8
+
9
+ const TAG_REGISTRIES = new Set(['items', 'blocks', 'fluids', 'entities']);
10
+
11
+ function registryFromCatalogKey(manifestKey: string): {
12
+ registry?: string;
13
+ path: string;
14
+ ns: string;
15
+ } {
16
+ const colon = manifestKey.indexOf(':');
17
+ const ns = colon > 0 ? manifestKey.slice(0, colon) : '';
18
+ const rest = colon > 0 ? manifestKey.slice(colon + 1) : manifestKey;
19
+ const slash = rest.indexOf('/');
20
+ if (slash <= 0) return { ns, path: rest };
21
+ const registry = rest.slice(0, slash);
22
+ return {
23
+ ns,
24
+ path: rest.slice(slash + 1),
25
+ ...(TAG_REGISTRIES.has(registry) ? { registry } : {}),
26
+ };
27
+ }
28
+
29
+ export function asTag(
30
+ raw: unknown,
31
+ manifestKey: string,
32
+ ids?: string[],
33
+ ): DumpTag | undefined {
34
+ const row = asRecord(raw);
35
+ if (!row) return undefined;
36
+ const members = asStringList(row.members);
37
+ const usedBy = asEdgeList(row.usedBy, ids);
38
+ const producedBy = asEdgeList(row.producedBy, ids);
39
+ const parsed = registryFromCatalogKey(manifestKey);
40
+ const registry = asString(row.registry) ?? parsed.registry;
41
+ if (!registry) return undefined;
42
+ const id =
43
+ asString(row.id) ?? (parsed.ns && parsed.path ? `${parsed.ns}:${parsed.path}` : '');
44
+ if (!id) return undefined;
45
+ return {
46
+ id,
47
+ registry,
48
+ replace: row.replace === true,
49
+ members,
50
+ usedBy,
51
+ producedBy,
52
+ };
53
+ }
54
+
55
+ export function firstTagItem(tag: DumpTag | undefined): string | undefined {
56
+ return tag?.members.find((value) => value && !value.startsWith('#'));
57
+ }
@@ -0,0 +1,56 @@
1
+ export type ResourceId = string;
2
+ export type ReferenceKind =
3
+ | "item"
4
+ | "block"
5
+ | "fluid"
6
+ | "entity"
7
+ | "itemTag"
8
+ | "blockTag"
9
+ | "fluidTag"
10
+ | "entityTag"
11
+ | "texture"
12
+ | "model"
13
+ | "recipe";
14
+
15
+ export interface DataGuidesBook {
16
+ categories: {
17
+ [k: string]: string | undefined;
18
+ };
19
+ cover?: null | TaggedReference;
20
+ display: GuideDisplay;
21
+ entries: {
22
+ [k: string]: string | undefined;
23
+ };
24
+ extensions?: {
25
+ [k: string]: JsonNode | undefined;
26
+ };
27
+ i18n?: boolean;
28
+ id?: string;
29
+ macros?: {
30
+ [k: string]: string | undefined;
31
+ };
32
+ model?: string;
33
+ order: number;
34
+ schema: "data/guides/book";
35
+ slug?: string;
36
+ subtitle?: string;
37
+ }
38
+ export interface TaggedReference {
39
+ id: ResourceId;
40
+ kind: ReferenceKind;
41
+ tag?: JsonNode;
42
+ }
43
+ export interface JsonNode {
44
+ [k: string]: unknown | undefined;
45
+ }
46
+ export interface GuideDisplay {
47
+ landing: DumpText[];
48
+ name: string;
49
+ }
50
+ export interface DumpText {
51
+ extra?: DumpText[];
52
+ keybind?: string;
53
+ text?: string;
54
+ translate?: string;
55
+ with?: DumpText[];
56
+ }
@@ -0,0 +1,30 @@
1
+ export type ResourceId = string;
2
+ export type ReferenceKind =
3
+ | "item"
4
+ | "block"
5
+ | "fluid"
6
+ | "entity"
7
+ | "itemTag"
8
+ | "blockTag"
9
+ | "fluidTag"
10
+ | "entityTag"
11
+ | "texture"
12
+ | "model"
13
+ | "recipe";
14
+
15
+ export interface DataGuidesCategory {
16
+ description?: string;
17
+ icon?: TaggedReference;
18
+ name?: string;
19
+ order: number;
20
+ schema: "data/guides/category";
21
+ [k: string]: unknown | undefined;
22
+ }
23
+ export interface TaggedReference {
24
+ id: ResourceId;
25
+ kind: ReferenceKind;
26
+ tag?: JsonNode;
27
+ }
28
+ export interface JsonNode {
29
+ [k: string]: unknown | undefined;
30
+ }
@@ -0,0 +1,48 @@
1
+ export type ResourceId = string;
2
+ export type ReferenceKind =
3
+ | "item"
4
+ | "block"
5
+ | "fluid"
6
+ | "entity"
7
+ | "itemTag"
8
+ | "blockTag"
9
+ | "fluidTag"
10
+ | "entityTag"
11
+ | "texture"
12
+ | "model"
13
+ | "recipe";
14
+
15
+ export interface DataGuidesEntry {
16
+ [k: string]: GuideEntry | undefined;
17
+ }
18
+ export interface GuideEntry {
19
+ category?: string;
20
+ display: GuideDisplay;
21
+ icon?: TaggedReference;
22
+ order?: number;
23
+ pages: GuidePage[];
24
+ [k: string]: unknown | undefined;
25
+ }
26
+ export interface GuideDisplay {
27
+ landing: DumpText[];
28
+ name: string;
29
+ }
30
+ export interface DumpText {
31
+ extra?: DumpText[];
32
+ keybind?: string;
33
+ text?: string;
34
+ translate?: string;
35
+ with?: DumpText[];
36
+ }
37
+ export interface TaggedReference {
38
+ id: ResourceId;
39
+ kind: ReferenceKind;
40
+ tag?: JsonNode;
41
+ }
42
+ export interface JsonNode {
43
+ [k: string]: unknown | undefined;
44
+ }
45
+ export interface GuidePage {
46
+ type?: string;
47
+ [k: string]: unknown | undefined;
48
+ }
@@ -0,0 +1,3 @@
1
+ export interface DataModelsModel {
2
+ [k: string]: string | undefined;
3
+ }
@@ -0,0 +1,126 @@
1
+ export type ResourceId = string;
2
+ export type ReferenceKind =
3
+ | "item"
4
+ | "block"
5
+ | "fluid"
6
+ | "entity"
7
+ | "itemTag"
8
+ | "blockTag"
9
+ | "fluidTag"
10
+ | "entityTag"
11
+ | "texture"
12
+ | "model"
13
+ | "recipe";
14
+
15
+ export interface DataQuestsChapter {
16
+ autofocusId?: string;
17
+ defaultHideDependencyLines?: boolean;
18
+ defaultQuestShape?: string;
19
+ description?: string[];
20
+ filename?: string;
21
+ group?: string;
22
+ icon?: TaggedReference;
23
+ id?: string;
24
+ images?: ChapterImage[];
25
+ orderIndex?: number;
26
+ questLinks?: {
27
+ [k: string]: QuestLink | undefined;
28
+ };
29
+ quests?: {
30
+ [k: string]: QuestEntry | undefined;
31
+ };
32
+ schema?: "data/quests/chapter";
33
+ subtitle?: string;
34
+ title?: string;
35
+ [k: string]: unknown | undefined;
36
+ }
37
+ export interface TaggedReference {
38
+ id: ResourceId;
39
+ kind: ReferenceKind;
40
+ tag?: JsonNode;
41
+ }
42
+ export interface JsonNode {
43
+ [k: string]: unknown | undefined;
44
+ }
45
+ export interface ChapterImage {
46
+ alignToCorner?: boolean;
47
+ alpha?: number;
48
+ animated?: boolean;
49
+ click?: string;
50
+ color?: number;
51
+ frameCount?: number;
52
+ frameH?: number;
53
+ frameSequence?: number[];
54
+ frameTime?: number;
55
+ frameW?: number;
56
+ h: number;
57
+ image: string;
58
+ rotation?: number;
59
+ w: number;
60
+ x: number;
61
+ y: number;
62
+ [k: string]: unknown | undefined;
63
+ }
64
+ export interface QuestLink {
65
+ icon?: TaggedReference;
66
+ id: string;
67
+ linkedQuest: string;
68
+ shape?: string;
69
+ size?: number;
70
+ x: number;
71
+ y: number;
72
+ [k: string]: unknown | undefined;
73
+ }
74
+ export interface QuestEntry {
75
+ canRepeat?: boolean;
76
+ dependencies?: string[];
77
+ description?: string[];
78
+ guidePage?: string;
79
+ hideDependencyLines?: boolean;
80
+ icon?: TaggedReference;
81
+ id: string;
82
+ image?: string;
83
+ invisible?: boolean;
84
+ minWidth?: number;
85
+ optional?: boolean;
86
+ rewards?: {
87
+ [k: string]: QuestReward | undefined;
88
+ };
89
+ shape?: string;
90
+ size?: number;
91
+ subtitle?: string;
92
+ tasks?: {
93
+ [k: string]: QuestTask | undefined;
94
+ };
95
+ title?: string;
96
+ x?: number;
97
+ y?: number;
98
+ [k: string]: unknown | undefined;
99
+ }
100
+ export interface QuestReward {
101
+ count?: number;
102
+ id?: string;
103
+ items?: TaggedReference[];
104
+ ref?: TaggedReference;
105
+ title?: string;
106
+ type: string;
107
+ xp?: number;
108
+ [k: string]: unknown | undefined;
109
+ }
110
+ export interface QuestTask {
111
+ biome?: string;
112
+ count?: number;
113
+ dimension?: string;
114
+ filter?: string;
115
+ filterRaw?: string;
116
+ icon?: TaggedReference;
117
+ id?: string;
118
+ itemFilter?: string;
119
+ items?: TaggedReference[];
120
+ optional?: boolean;
121
+ ref?: TaggedReference;
122
+ stage?: string;
123
+ title?: string;
124
+ type: string;
125
+ [k: string]: unknown | undefined;
126
+ }
@@ -0,0 +1,11 @@
1
+ export interface DataQuestsChapterGroups {
2
+ chapterGroups: {
3
+ [k: string]: QuestChapterGroup | undefined;
4
+ };
5
+ schema: "data/quests/chapter_groups";
6
+ }
7
+ export interface QuestChapterGroup {
8
+ id: string;
9
+ orderIndex?: number;
10
+ title?: string;
11
+ }
@@ -0,0 +1,40 @@
1
+ export type ResourceId = string;
2
+ export type ReferenceKind =
3
+ | "item"
4
+ | "block"
5
+ | "fluid"
6
+ | "entity"
7
+ | "itemTag"
8
+ | "blockTag"
9
+ | "fluidTag"
10
+ | "entityTag"
11
+ | "texture"
12
+ | "model"
13
+ | "recipe";
14
+
15
+ export interface DataQuestsData {
16
+ chapters: {
17
+ [k: string]: QuestChapterSummary | undefined;
18
+ };
19
+ defaults: {
20
+ [k: string]: JsonNode | undefined;
21
+ };
22
+ icon?: TaggedReference;
23
+ schema: "data/quests/data";
24
+ title?: string;
25
+ }
26
+ export interface QuestChapterSummary {
27
+ count: number;
28
+ file: string;
29
+ icon?: TaggedReference;
30
+ id?: string;
31
+ title?: string;
32
+ }
33
+ export interface TaggedReference {
34
+ id: ResourceId;
35
+ kind: ReferenceKind;
36
+ tag?: JsonNode;
37
+ }
38
+ export interface JsonNode {
39
+ [k: string]: unknown | undefined;
40
+ }
@@ -0,0 +1,78 @@
1
+ export type ResourceId = string;
2
+ export type ReferenceKind =
3
+ | "item"
4
+ | "block"
5
+ | "fluid"
6
+ | "entity"
7
+ | "itemTag"
8
+ | "blockTag"
9
+ | "fluidTag"
10
+ | "entityTag"
11
+ | "texture"
12
+ | "model"
13
+ | "recipe";
14
+
15
+ export interface DataRecipesRecipe {
16
+ [k: string]: RecipeEntry | undefined;
17
+ }
18
+ export interface RecipeEntry {
19
+ category: string;
20
+ h?: number;
21
+ image?: string;
22
+ order?: number;
23
+ properties: {};
24
+ slots: {
25
+ [k: string]: RecipeSlot | undefined;
26
+ };
27
+ w?: number;
28
+ widgets?: RecipeWidget[];
29
+ }
30
+ export interface RecipeSlot {
31
+ alternatives?: TaggedReference[];
32
+ amount?: number | null;
33
+ chance?: number;
34
+ h?: number;
35
+ ref: TaggedReference;
36
+ type: string;
37
+ w?: number;
38
+ x?: number;
39
+ y?: number;
40
+ }
41
+ export interface TaggedReference {
42
+ id: ResourceId;
43
+ kind: ReferenceKind;
44
+ tag?: JsonNode;
45
+ }
46
+ export interface JsonNode {
47
+ [k: string]: unknown | undefined;
48
+ }
49
+ export interface RecipeWidget {
50
+ color?: number | null;
51
+ component?: null | DumpText;
52
+ endToStart?: boolean | null;
53
+ fullToEmpty?: boolean | null;
54
+ h: number;
55
+ horizontal?: boolean | null;
56
+ regionH?: number | null;
57
+ regionW?: number | null;
58
+ shadow?: boolean | null;
59
+ text?: string | null;
60
+ texture?: string | null;
61
+ textureH?: number | null;
62
+ textureW?: number | null;
63
+ time?: number | null;
64
+ tooltip?: string[] | null;
65
+ type: string;
66
+ u?: number | null;
67
+ v?: number | null;
68
+ w: number;
69
+ x: number;
70
+ y: number;
71
+ }
72
+ export interface DumpText {
73
+ extra?: DumpText[];
74
+ keybind?: string;
75
+ text?: string;
76
+ translate?: string;
77
+ with?: DumpText[];
78
+ }
@@ -0,0 +1,20 @@
1
+ export type { ResourceId, ReferenceKind, DataGuidesBook, TaggedReference, JsonNode, GuideDisplay, DumpText } from './data/guides/book';
2
+ export type { DataGuidesCategory } from './data/guides/category';
3
+ export type { DataGuidesEntry, GuideEntry, GuidePage } from './data/guides/entry';
4
+ export type { DataModelsModel } from './data/models/model';
5
+ export type { DataQuestsChapter, ChapterImage, QuestLink, QuestEntry, QuestReward, QuestTask } from './data/quests/chapter';
6
+ export type { DataQuestsChapterGroups, QuestChapterGroup } from './data/quests/chapter_groups';
7
+ export type { DataQuestsData, QuestChapterSummary } from './data/quests/data';
8
+ export type { DataRecipesRecipe, RecipeEntry, RecipeSlot, RecipeWidget } from './data/recipes/recipe';
9
+ export type { Keybinds } from './keybinds';
10
+ export type { Lang } from './lang';
11
+ export type { Manifest, DumpIndexes, RecipeTypesIndex, RecipeTypeRow, NamespaceDisplay, Display, PackInfo, DumpProducer } from './manifest';
12
+ export type { RegistryBlocks, BlockEntry, SpriteEntry } from './registry/blocks';
13
+ export type { RegistryEntities, EntityEntry, VariantEntry } from './registry/entities';
14
+ export type { RegistryFluids, FluidEntry } from './registry/fluids';
15
+ export type { RegistryGroups, StackGroupValue } from './registry/groups';
16
+ export type { RegistryItems, ItemEntry } from './registry/items';
17
+ export type { RegistryRecipeCategories, RecipeCategory, RecipeCategoryLayout, RecipeLayoutSlot } from './registry/recipe_categories';
18
+ export type { RegistryRecipes } from './registry/recipes';
19
+ export type { RegistryTabs, TabEntry } from './registry/tabs';
20
+ export type { RegistryTags, TagEntry } from './registry/tags';
@@ -0,0 +1,3 @@
1
+ export interface Keybinds {
2
+ [k: string]: string | undefined;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface Lang {
2
+ [k: string]: string | undefined;
3
+ }
@@ -0,0 +1,59 @@
1
+ export interface Manifest {
2
+ indexes: DumpIndexes;
3
+ languages: string[];
4
+ layout: string;
5
+ namespaces: {
6
+ [k: string]: NamespaceDisplay | undefined;
7
+ };
8
+ pack?: null | PackInfo;
9
+ producer: DumpProducer;
10
+ schema: "manifest";
11
+ }
12
+ export interface DumpIndexes {
13
+ quests: {
14
+ [k: string]: string | undefined;
15
+ };
16
+ recipes: RecipeTypesIndex;
17
+ used: string[];
18
+ }
19
+ export interface RecipeTypesIndex {
20
+ types: RecipeTypeRow[];
21
+ }
22
+ export interface RecipeTypeRow {
23
+ count: number;
24
+ files: {
25
+ [k: string]: string | undefined;
26
+ };
27
+ id: string;
28
+ }
29
+ export interface NamespaceDisplay {
30
+ display: Display;
31
+ guides: string[];
32
+ keybinds: boolean;
33
+ languages: string[];
34
+ quests: boolean;
35
+ registry: string[];
36
+ }
37
+ export interface Display {
38
+ name: string;
39
+ tooltip: DumpText[];
40
+ tooltipMods: {
41
+ [k: string]: DumpText[] | undefined;
42
+ };
43
+ }
44
+ export interface DumpText {
45
+ extra?: DumpText[];
46
+ keybind?: string;
47
+ text?: string;
48
+ translate?: string;
49
+ with?: DumpText[];
50
+ }
51
+ export interface PackInfo {
52
+ id: string;
53
+ version?: string | null;
54
+ }
55
+ export interface DumpProducer {
56
+ minecraft: string;
57
+ name: string;
58
+ platform: string;
59
+ }
@@ -0,0 +1,60 @@
1
+ export type ResourceId = string;
2
+ export type ReferenceKind =
3
+ | "item"
4
+ | "block"
5
+ | "fluid"
6
+ | "entity"
7
+ | "itemTag"
8
+ | "blockTag"
9
+ | "fluidTag"
10
+ | "entityTag"
11
+ | "texture"
12
+ | "model"
13
+ | "recipe";
14
+
15
+ export interface RegistryBlocks {
16
+ [k: string]: BlockEntry | undefined;
17
+ }
18
+ export interface BlockEntry {
19
+ display: Display;
20
+ id: string;
21
+ item?: null | TaggedReference;
22
+ order?: number | null;
23
+ producedBy?: string[];
24
+ sprite?: null | SpriteEntry;
25
+ tags?: string[];
26
+ usedBy?: string[];
27
+ }
28
+ export interface Display {
29
+ name: string;
30
+ tooltip: DumpText[];
31
+ tooltipMods: {
32
+ [k: string]: DumpText[] | undefined;
33
+ };
34
+ }
35
+ export interface DumpText {
36
+ extra?: DumpText[];
37
+ keybind?: string;
38
+ text?: string;
39
+ translate?: string;
40
+ with?: DumpText[];
41
+ }
42
+ export interface TaggedReference {
43
+ id: ResourceId;
44
+ kind: ReferenceKind;
45
+ tag?: JsonNode;
46
+ }
47
+ export interface JsonNode {
48
+ [k: string]: unknown | undefined;
49
+ }
50
+ export interface SpriteEntry {
51
+ h: number;
52
+ image: string;
53
+ ph: number;
54
+ pw: number;
55
+ tint?: string | null;
56
+ tintColor?: string | null;
57
+ w: number;
58
+ x: number;
59
+ y: number;
60
+ }
@@ -0,0 +1,49 @@
1
+ export interface RegistryEntities {
2
+ [k: string]: EntityEntry | undefined;
3
+ }
4
+ export interface EntityEntry {
5
+ display: Display;
6
+ id: string;
7
+ model?: string | null;
8
+ order?: number | null;
9
+ producedBy?: string[];
10
+ tags?: string[];
11
+ texture?: string | null;
12
+ usedBy?: string[];
13
+ variants: VariantEntry[];
14
+ }
15
+ export interface Display {
16
+ name: string;
17
+ tooltip: DumpText[];
18
+ tooltipMods: {
19
+ [k: string]: DumpText[] | undefined;
20
+ };
21
+ }
22
+ export interface DumpText {
23
+ extra?: DumpText[];
24
+ keybind?: string;
25
+ text?: string;
26
+ translate?: string;
27
+ with?: DumpText[];
28
+ }
29
+ export interface VariantEntry {
30
+ display?: null | Display;
31
+ model?: string | null;
32
+ sprite?: null | SpriteEntry;
33
+ tag?: null | JsonNode;
34
+ texture?: string | null;
35
+ }
36
+ export interface SpriteEntry {
37
+ h: number;
38
+ image: string;
39
+ ph: number;
40
+ pw: number;
41
+ tint?: string | null;
42
+ tintColor?: string | null;
43
+ w: number;
44
+ x: number;
45
+ y: number;
46
+ }
47
+ export interface JsonNode {
48
+ [k: string]: unknown | undefined;
49
+ }