@terrafirmagreg-team/dump 0.0.0-stage → 1.2.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 (57) hide show
  1. package/package.json +28 -3
  2. package/src/lib/dump/assets/atlas/dto.ts +51 -0
  3. package/src/lib/dump/assets/atlas/lookup.ts +207 -0
  4. package/src/lib/dump/assets/atlas/sprites.ts +132 -0
  5. package/src/lib/dump/assets/lang/load.ts +19 -0
  6. package/src/lib/dump/assets/lang/names.ts +244 -0
  7. package/src/lib/dump/assets/urls.ts +145 -0
  8. package/src/lib/dump/client/atlases.ts +85 -0
  9. package/src/lib/dump/client/dump.ts +132 -0
  10. package/src/lib/dump/client/groups.ts +27 -0
  11. package/src/lib/dump/client/keybinds.ts +16 -0
  12. package/src/lib/dump/client/mods.ts +18 -0
  13. package/src/lib/dump/client/registry.ts +121 -0
  14. package/src/lib/dump/client/tabs.ts +23 -0
  15. package/src/lib/dump/client/tags.ts +59 -0
  16. package/src/lib/dump/contract/kind.ts +62 -0
  17. package/src/lib/dump/contract/read.ts +76 -0
  18. package/src/lib/dump/contract/ref.ts +260 -0
  19. package/src/lib/dump/contract/text.ts +101 -0
  20. package/src/lib/dump/data/registry/dto.ts +57 -0
  21. package/src/lib/dump/data/registry/parse.ts +291 -0
  22. package/src/lib/dump/data/tab/dto.ts +14 -0
  23. package/src/lib/dump/data/tab/parse.ts +27 -0
  24. package/src/lib/dump/data/tag/dto.ts +8 -0
  25. package/src/lib/dump/data/tag/parse.ts +58 -0
  26. package/src/lib/dump/gen/data/guides/book.ts +57 -0
  27. package/src/lib/dump/gen/data/guides/category.ts +31 -0
  28. package/src/lib/dump/gen/data/guides/entry.ts +49 -0
  29. package/src/lib/dump/gen/data/models/model.ts +4 -0
  30. package/src/lib/dump/gen/data/quests/chapter.ts +127 -0
  31. package/src/lib/dump/gen/data/quests/chapter_groups.ts +12 -0
  32. package/src/lib/dump/gen/data/quests/data.ts +41 -0
  33. package/src/lib/dump/gen/data/recipes/recipe.ts +79 -0
  34. package/src/lib/dump/gen/index.ts +21 -0
  35. package/src/lib/dump/gen/keybinds.ts +4 -0
  36. package/src/lib/dump/gen/lang.ts +4 -0
  37. package/src/lib/dump/gen/manifest.ts +60 -0
  38. package/src/lib/dump/gen/registry/blocks.ts +61 -0
  39. package/src/lib/dump/gen/registry/entities.ts +50 -0
  40. package/src/lib/dump/gen/registry/fluids.ts +49 -0
  41. package/src/lib/dump/gen/registry/groups.ts +15 -0
  42. package/src/lib/dump/gen/registry/items.ts +52 -0
  43. package/src/lib/dump/gen/registry/recipe_categories.ts +65 -0
  44. package/src/lib/dump/gen/registry/recipes.ts +4 -0
  45. package/src/lib/dump/gen/registry/tabs.ts +47 -0
  46. package/src/lib/dump/gen/registry/tags.ts +12 -0
  47. package/src/lib/dump/json-reader.ts +254 -0
  48. package/src/lib/dump/manifest/dto.ts +12 -0
  49. package/src/lib/dump/manifest/parse.ts +168 -0
  50. package/src/lib/dump/mods/dto.ts +31 -0
  51. package/src/lib/dump/mods/index.ts +97 -0
  52. package/src/lib/dump/mods/load.ts +60 -0
  53. package/src/lib/dump/paths.ts +172 -0
  54. package/src/lib/dump/reader.ts +31 -0
  55. package/src/lib/dump-search.ts +125 -0
  56. package/src/lib/snbt.ts +247 -0
  57. package/README.md +0 -3
@@ -0,0 +1,41 @@
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
+ }
41
+
@@ -0,0 +1,79 @@
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
+ }
79
+
@@ -0,0 +1,21 @@
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';
21
+
@@ -0,0 +1,4 @@
1
+ export interface Keybinds {
2
+ [k: string]: string | undefined;
3
+ }
4
+
@@ -0,0 +1,4 @@
1
+ export interface Lang {
2
+ [k: string]: string | undefined;
3
+ }
4
+
@@ -0,0 +1,60 @@
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
+ }
60
+
@@ -0,0 +1,61 @@
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
+ }
61
+
@@ -0,0 +1,50 @@
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
+ }
50
+
@@ -0,0 +1,49 @@
1
+ export interface RegistryFluids {
2
+ [k: string]: FluidEntry | undefined;
3
+ }
4
+ export interface FluidEntry {
5
+ display: Display;
6
+ id: string;
7
+ order?: number | null;
8
+ producedBy?: string[];
9
+ sprite?: null | SpriteEntry;
10
+ tags?: string[];
11
+ usedBy?: string[];
12
+ variants: VariantEntry[];
13
+ }
14
+ export interface Display {
15
+ name: string;
16
+ tooltip: DumpText[];
17
+ tooltipMods: {
18
+ [k: string]: DumpText[] | undefined;
19
+ };
20
+ }
21
+ export interface DumpText {
22
+ extra?: DumpText[];
23
+ keybind?: string;
24
+ text?: string;
25
+ translate?: string;
26
+ with?: DumpText[];
27
+ }
28
+ export interface SpriteEntry {
29
+ h: number;
30
+ image: string;
31
+ ph: number;
32
+ pw: number;
33
+ tint?: string | null;
34
+ tintColor?: string | null;
35
+ w: number;
36
+ x: number;
37
+ y: number;
38
+ }
39
+ export interface VariantEntry {
40
+ display?: null | Display;
41
+ model?: string | null;
42
+ sprite?: null | SpriteEntry;
43
+ tag?: null | JsonNode;
44
+ texture?: string | null;
45
+ }
46
+ export interface JsonNode {
47
+ [k: string]: unknown | undefined;
48
+ }
49
+
@@ -0,0 +1,15 @@
1
+ export interface RegistryGroups {
2
+ [k: string]: StackGroupValue | undefined;
3
+ }
4
+ export interface StackGroupValue {
5
+ members: string[];
6
+ name?: null | DumpText;
7
+ }
8
+ export interface DumpText {
9
+ extra?: DumpText[];
10
+ keybind?: string;
11
+ text?: string;
12
+ translate?: string;
13
+ with?: DumpText[];
14
+ }
15
+
@@ -0,0 +1,52 @@
1
+ export interface RegistryItems {
2
+ [k: string]: ItemEntry | undefined;
3
+ }
4
+ export interface ItemEntry {
5
+ block?: string | null;
6
+ display: Display;
7
+ id: string;
8
+ maxCount?: number | null;
9
+ order?: number | null;
10
+ producedBy?: string[];
11
+ rarity?: string | null;
12
+ sprite?: null | SpriteEntry;
13
+ tags?: string[];
14
+ usedBy?: string[];
15
+ variants: VariantEntry[];
16
+ }
17
+ export interface Display {
18
+ name: string;
19
+ tooltip: DumpText[];
20
+ tooltipMods: {
21
+ [k: string]: DumpText[] | undefined;
22
+ };
23
+ }
24
+ export interface DumpText {
25
+ extra?: DumpText[];
26
+ keybind?: string;
27
+ text?: string;
28
+ translate?: string;
29
+ with?: DumpText[];
30
+ }
31
+ export interface SpriteEntry {
32
+ h: number;
33
+ image: string;
34
+ ph: number;
35
+ pw: number;
36
+ tint?: string | null;
37
+ tintColor?: string | null;
38
+ w: number;
39
+ x: number;
40
+ y: number;
41
+ }
42
+ export interface VariantEntry {
43
+ display?: null | Display;
44
+ model?: string | null;
45
+ sprite?: null | SpriteEntry;
46
+ tag?: null | JsonNode;
47
+ texture?: string | null;
48
+ }
49
+ export interface JsonNode {
50
+ [k: string]: unknown | undefined;
51
+ }
52
+
@@ -0,0 +1,65 @@
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 RegistryRecipeCategories {
16
+ [k: string]: RecipeCategory | undefined;
17
+ }
18
+ export interface RecipeCategory {
19
+ display: Display;
20
+ icon?: null | TaggedReference;
21
+ layout?: null | RecipeCategoryLayout;
22
+ order: number;
23
+ workstations?: TaggedReference[];
24
+ }
25
+ export interface Display {
26
+ name: string;
27
+ tooltip: DumpText[];
28
+ tooltipMods: {
29
+ [k: string]: DumpText[] | undefined;
30
+ };
31
+ }
32
+ export interface DumpText {
33
+ extra?: DumpText[];
34
+ keybind?: string;
35
+ text?: string;
36
+ translate?: string;
37
+ with?: DumpText[];
38
+ }
39
+ export interface TaggedReference {
40
+ id: ResourceId;
41
+ kind: ReferenceKind;
42
+ tag?: JsonNode;
43
+ }
44
+ export interface JsonNode {
45
+ [k: string]: unknown | undefined;
46
+ }
47
+ export interface RecipeCategoryLayout {
48
+ h: number;
49
+ image?: string;
50
+ margin?: number;
51
+ scale?: number;
52
+ slots: {
53
+ [k: string]: RecipeLayoutSlot | undefined;
54
+ };
55
+ w: number;
56
+ }
57
+ export interface RecipeLayoutSlot {
58
+ h: number;
59
+ id: string;
60
+ role: string;
61
+ w: number;
62
+ x: number;
63
+ y: number;
64
+ }
65
+
@@ -0,0 +1,4 @@
1
+ export interface RegistryRecipes {
2
+ [k: string]: string[] | undefined;
3
+ }
4
+
@@ -0,0 +1,47 @@
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 RegistryTabs {
16
+ [k: string]: TabEntry | undefined;
17
+ }
18
+ export interface TabEntry {
19
+ display: Display;
20
+ icon?: null | TaggedReference;
21
+ id: string;
22
+ items: TaggedReference[];
23
+ order: number;
24
+ }
25
+ export interface Display {
26
+ name: string;
27
+ tooltip: DumpText[];
28
+ tooltipMods: {
29
+ [k: string]: DumpText[] | undefined;
30
+ };
31
+ }
32
+ export interface DumpText {
33
+ extra?: DumpText[];
34
+ keybind?: string;
35
+ text?: string;
36
+ translate?: string;
37
+ with?: DumpText[];
38
+ }
39
+ export interface TaggedReference {
40
+ id: ResourceId;
41
+ kind: ReferenceKind;
42
+ tag?: JsonNode;
43
+ }
44
+ export interface JsonNode {
45
+ [k: string]: unknown | undefined;
46
+ }
47
+
@@ -0,0 +1,12 @@
1
+ export interface RegistryTags {
2
+ [k: string]: TagEntry | undefined;
3
+ }
4
+ export interface TagEntry {
5
+ id: string;
6
+ members?: string[];
7
+ producedBy?: string[];
8
+ registry: string;
9
+ replace: boolean;
10
+ usedBy?: string[];
11
+ }
12
+