Skip to content

Commit

Permalink
🐛 ファイルタイプが不足しているのを修正、それに伴い設定を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenCMD committed Mar 7, 2022
1 parent 78b1173 commit 7cf2626
Show file tree
Hide file tree
Showing 2 changed files with 234 additions and 23 deletions.
154 changes: 153 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,14 @@
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"item_modifier": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"loot_table": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
Expand Down Expand Up @@ -545,6 +553,14 @@
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/game_event": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/item": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
Expand All @@ -553,6 +569,110 @@
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/worldgen/biome": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/worldgen/configured_carver": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/worldgen/configured_decorator": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/worldgen/configured_feature": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/worldgen/configured_structure_feature": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/worldgen/configured_surface_builder": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/worldgen/density_function": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/worldgen/noise": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/worldgen/noise_settings": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/worldgen/placed_feature": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/worldgen/processor_list": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/worldgen/structure_set": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"tag/worldgen/template_pool": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"worldgen/biome": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
Expand Down Expand Up @@ -601,6 +721,22 @@
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"worldgen/density_function": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"worldgen/noise": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"worldgen/noise_settings": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
Expand All @@ -609,6 +745,14 @@
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"worldgen/placed_feature": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"worldgen/processor_list": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
Expand All @@ -617,6 +761,14 @@
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"worldgen/structure_set": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
"items": {
"type": "string",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%"
}
},
"worldgen/template_pool": {
"type": "array",
"markdownDescription": "%mcdutil.config.createFile.fileTemplate%",
Expand Down Expand Up @@ -660,4 +812,4 @@
"webpack": "^5.36.2",
"webpack-cli": "^4.7.0"
}
}
}
103 changes: 81 additions & 22 deletions src/types/FileTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export type FileType =
| 'dimension'
| 'dimension_type'
| 'function'
| 'item_modifier'
| 'loot_table'
| 'predicate'
| 'recipe'
Expand All @@ -40,23 +41,42 @@ export type FileType =
| 'tag/entity_type'
| 'tag/fluid'
| 'tag/function'
| 'tag/game_event'
| 'tag/item'
| 'tag/worldgen/biome'
| 'tag/worldgen/configured_carver'
| 'tag/worldgen/configured_decorator'
| 'tag/worldgen/configured_feature'
| 'tag/worldgen/configured_structure_feature'
| 'tag/worldgen/configured_surface_builder'
| 'tag/worldgen/density_function'
| 'tag/worldgen/noise'
| 'tag/worldgen/noise_settings'
| 'tag/worldgen/placed_feature'
| 'tag/worldgen/processor_list'
| 'tag/worldgen/structure_set'
| 'tag/worldgen/template_pool'
| 'worldgen/biome'
| 'worldgen/configured_carver'
| 'worldgen/configured_decorator'
| 'worldgen/configured_feature'
| 'worldgen/configured_structure_feature'
| 'worldgen/configured_surface_builder'
| 'worldgen/density_function'
| 'worldgen/noise'
| 'worldgen/noise_settings'
| 'worldgen/placed_feature'
| 'worldgen/processor_list'
| 'worldgen/structure_set'
| 'worldgen/template_pool';

export const fileTypeFolderName: {[key in FileType]: string} = {
export const fileTypeFolderName: { [key in FileType]: string } = {
// common
advancement: 'advancements',
dimension: 'dimension',
dimension_type: 'dimension_type',
function: 'functions',
item_modifier: 'item_modifiers',
loot_table: 'loot_tables',
predicate: 'predicates',
recipe: 'recipes',
Expand All @@ -66,45 +86,84 @@ export const fileTypeFolderName: {[key in FileType]: string} = {
'tag/entity_type': 'tags/entity_types',
'tag/fluid': 'tags/fluids',
'tag/function': 'tags/functions',
'tag/game_event': 'tags/game_event',
'tag/item': 'tags/items',
// tag/worldgen
'tag/worldgen/biome': 'tags/worldgen/biome',
'tag/worldgen/configured_carver': 'tags/worldgen/configured_carver',
'tag/worldgen/configured_decorator': 'tags/worldgen/configured_decorator',
'tag/worldgen/configured_feature': 'tags/worldgen/configured_feature',
'tag/worldgen/configured_structure_feature': 'tags/worldgen/configured_structure_feature',
'tag/worldgen/configured_surface_builder': 'tags/worldgen/configured_surface_builder',
'tag/worldgen/density_function': 'tags/worldgen/density_function',
'tag/worldgen/noise': 'tags/worldgen/noise',
'tag/worldgen/noise_settings': 'tags/worldgen/noise_settings',
'tag/worldgen/placed_feature': 'tags/worldgen/placed_feature',
'tag/worldgen/processor_list': 'tags/worldgen/processor_list',
'tag/worldgen/structure_set': 'tags/worldgen/structure_set',
'tag/worldgen/template_pool': 'tags/worldgen/template_pool',
// worldgen
'worldgen/biome': 'worldgen/biome',
'worldgen/configured_carver': 'worldgen/configured_carver',
'worldgen/configured_decorator': 'worldgen/configured_decorator',
'worldgen/configured_feature': 'worldgen/configured_feature',
'worldgen/configured_structure_feature': 'worldgen/configured_structure_feature',
'worldgen/configured_surface_builder': 'worldgen/configured_surface_builder',
'worldgen/density_function': 'worldgen/density_function',
'worldgen/noise': 'worldgen/noise',
'worldgen/noise_settings': 'worldgen/noise_settings',
'worldgen/placed_feature': 'worldgen/placed_feature',
'worldgen/processor_list': 'worldgen/processor_list',
'worldgen/structure_set': 'worldgen/structure_set',
'worldgen/template_pool': 'worldgen/template_pool'
};

export const fileTypePaths: Record<FileType, string> = {
// common
advancement: 'data/*/advancements/**',
dimension: 'data/*/dimension/**',
dimension_type: 'data/*/dimension_type/**',
function: 'data/*/functions/**',
loot_table: 'data/*/loot_tables/**',
predicate: 'data/*/predicates/**',
recipe: 'data/*/recipes/**',
advancement: 'data/*/advancements/**/*.json',
dimension: 'data/*/dimension/**/*.json',
dimension_type: 'data/*/dimension_type/**/*.json',
function: 'data/*/functions/**/*.mcfunction',
item_modifier: 'data/*/item_modifiers/**/*.json',
loot_table: 'data/*/loot_tables/**/*.json',
predicate: 'data/*/predicates/**/*.json',
recipe: 'data/*/recipes/**/*.json',
structure: 'data/*/structures/**/*.nbt',
// tag
'tag/block': 'data/*/tags/blocks/**',
'tag/entity_type': 'data/*/tags/entity_types/**',
'tag/fluid': 'data/*/tags/fluids/**',
'tag/function': 'data/*/tags/functions/**',
'tag/item': 'data/*/tags/items/**',
'tag/block': 'data/*/tags/blocks/**/*.json',
'tag/entity_type': 'data/*/tags/entity_types/**/*.json',
'tag/fluid': 'data/*/tags/fluids/**/*.json',
'tag/function': 'data/*/tags/functions/**/*.json',
'tag/game_event': 'data/*/tags/game_events/**/*.json',
'tag/item': 'data/*/tags/items/**/*.json',
// tag/worldgen
'tag/worldgen/biome': 'data/*/tags/worldgen/biome/**/*.json',
'tag/worldgen/configured_carver': 'data/*/tags/worldgen/configured_carver/**/*.json',
'tag/worldgen/configured_decorator': 'data/*/tags/worldgen/configured_decorator/**/*.json',
'tag/worldgen/configured_feature': 'data/*/tags/worldgen/configured_feature/**/*.json',
'tag/worldgen/configured_structure_feature': 'data/*/tags/worldgen/configured_structure_feature/**/*.json',
'tag/worldgen/configured_surface_builder': 'data/*/tags/worldgen/configured_surface_builder/**/*.json',
'tag/worldgen/density_function': 'data/*/tags/worldgen/density_function/**/*.json',
'tag/worldgen/noise': 'data/*/tags/worldgen/noise/**/*.json',
'tag/worldgen/noise_settings': 'data/*/tags/worldgen/noise_settings/**/*.json',
'tag/worldgen/placed_feature': 'data/*/tags/worldgen/placed_feature/**/*.json',
'tag/worldgen/processor_list': 'data/*/tags/worldgen/processor_list/**/*.json',
'tag/worldgen/structure_set': 'data/*/tags/worldgen/structure_set/**/*.json',
'tag/worldgen/template_pool': 'data/*/tags/worldgen/template_pool/**/*.json',
// worldgen
'worldgen/biome': 'data/*/worldgen/biome/**',
'worldgen/configured_carver': 'data/*/worldgen/configured_carver/**',
'worldgen/configured_decorator': 'data/*/worldgen/configured_decorator/**',
'worldgen/configured_feature': 'data/*/worldgen/configured_feature/**',
'worldgen/configured_structure_feature': 'data/*/worldgen/configured_structure_feature/**',
'worldgen/configured_surface_builder': 'data/*/worldgen/configured_surface_builder/**',
'worldgen/noise_settings': 'data/*/worldgen/noise_settings/**',
'worldgen/processor_list': 'data/*/worldgen/processor_list/**',
'worldgen/template_pool': 'data/*/worldgen/template_pool/**'
'worldgen/biome': 'data/*/worldgen/biome/**/*.json',
'worldgen/configured_carver': 'data/*/worldgen/configured_carver/**/*.json',
'worldgen/configured_decorator': 'data/*/worldgen/configured_decorator/**/*.json',
'worldgen/configured_feature': 'data/*/worldgen/configured_feature/**/*.json',
'worldgen/configured_structure_feature': 'data/*/worldgen/configured_structure_feature/**/*.json',
'worldgen/configured_surface_builder': 'data/*/worldgen/configured_surface_builder/**/*.json',
'worldgen/density_function': 'data/*/worldgen/density_function/**/*.json',
'worldgen/noise': 'data/*/worldgen/noise/**/*.json',
'worldgen/noise_settings': 'data/*/worldgen/noise_settings/**/*.json',
'worldgen/placed_feature': 'data/*/worldgen/placed_feature/**/*.json',
'worldgen/processor_list': 'data/*/worldgen/processor_list/**/*.json',
'worldgen/structure_set': 'data/*/worldgen/structure_set/**/*.json',
'worldgen/template_pool': 'data/*/worldgen/template_pool/**/*.json'
};

/**
Expand Down

0 comments on commit 7cf2626

Please sign in to comment.