Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into dev/haiiro_MPMaxP…
Browse files Browse the repository at this point in the history
…layerModifier
  • Loading branch information
haiiro2gou committed Sep 25, 2024
2 parents 2c6cb15 + a5d10d2 commit 9735b60
Show file tree
Hide file tree
Showing 444 changed files with 9,918 additions and 1,135 deletions.
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ indent_style = space
indent_size = 4
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
trim_trailing_whitespace = false
4 changes: 4 additions & 0 deletions .github/workflows/datapack-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
muteSuccessResult: true
ignoreLintPathPattern: |
animated_java:**
core:define_gamerule
- name: Checkout Asset2
if: ${{ github.ref == 'refs/heads/master' }}
Expand All @@ -39,6 +40,7 @@ jobs:
run: |
npm i -g ts-node
npm i -D @types/node
echo '{"compilerOptions": {"target": "ESNext"}}' > ./tsconfig.json
- name: Generate declares.d.mcfunction
if: ${{ github.ref == 'refs/heads/master' }}
Expand Down Expand Up @@ -71,6 +73,8 @@ jobs:
function@asset:spawner/spawner_id/register
function@asset:teleporter/tp_id/register
function@asset:trader/trader_name/register/register
function@asset:object/OBJECT_NAME/register
function@asset:object/OBJECT_NAME/tick/
OUTPUT_PATH: ./Asset2/Asset/data/minecraft/functions/declares.d.mcfunction
OUTPUT_RESOURCE_PATH: minecraft:declares.d

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/make-declares-mcf.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
`use strict`
import fsp from "fs/promises"
import { promises as fsp } from "fs"


type FileType = "advancement" | "damage_type" | "dimension" | "dimension_type" | "function" | "item_modifier" | "loot_table" | "predicate" | "recipe" | "structure" | "tag/block" | "tag/damage_type" | "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" | "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/flat_level_generator_preset" | "worldgen/noise" | "worldgen/noise_settings" | "worldgen/placed_feature" | "worldgen/processor_list" | "worldgen/structure" | "worldgen/structure_set" | "worldgen/template_pool" | "worldgen/world_preset"
Expand Down Expand Up @@ -148,4 +148,4 @@ const run = async () => {
await fsp.writeFile(outputPath, declares)
}

run()
run()
322 changes: 320 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,25 @@
}
]
},
{
"label": "神器/トリガー: 回復",
"generates": [
{
"type": "file",
"rel": "data/asset/tags/functions/artifact/heal.json",
"content": {
"values": [
"asset:artifact/%namespace%/trigger/1.trigger"
]
},
"append": {
"addFirst": true,
"key": "values",
"elem": "asset:artifact/%namespace%/trigger/1.trigger"
}
}
]
},
{
"label": "神器/トリガー: 装備着脱",
"generates": [
Expand Down Expand Up @@ -2106,7 +2125,304 @@
"patternErrorMessage": "数値のみが許されるよ"
}
]
}
},
{
"label": "Object/登録処理",
"generates": [
{
"type": "file",
"rel": "data/asset/functions/object/%namespace%/register.mcfunction",
"content": [
"#> asset:object/%namespace%/register",
"#",
"# Objectのデータを指定",
"#",
"# @within function asset:object/alias/%id%/register",
"",
"# 他のモブに継承されることを許可するか (boolean) (オプション)",
" # data modify storage asset:object ExtendsSafe set value ",
"# 継承されることを前提とした、抽象的なオブジェクトであるかどうか(boolean)",
" data modify storage asset:object IsAbstract set value false",
"# ID (int)",
" data modify storage asset:object ID set value %id%",
"# フィールド",
" # data modify storage asset:object Field.myValue set value "
]
},
{
"type": "file",
"rel": "data/asset/functions/object/alias/%id%/register.mcfunction",
"content": [
"#> asset:object/alias/%id%/register",
"#",
"# Objectのデータ指定処理のエイリアス",
"#",
"# @within asset_manager:object/summon/register.m",
"",
"# 元の登録処理を呼び出す",
" function asset:object/%namespace%/register"
]
},
{
"type": "file",
"rel": "data/asset/functions/object/%namespace%/summon/debug.mcfunction",
"content": [
"#> asset:mob/%namespace%/summon/debug",
"#",
"# 動作チェック用の召喚処理 使い終わったら消してもいいかも",
"#",
"# @user",
"# @private",
"",
"# 召喚",
" data modify storage api: Argument.ID set value %id%",
" function api:object/summon"
]
}
],
"customQuestion": [
{
"name": "id",
"question": "ObjectのID",
"pattern": "[1-9][0-9]*",
"patternErrorMessage": "数値のみが許されるよ"
}
]
},
{
"label": "Object/ 召喚処理",
"generates": [
{
"type": "file",
"rel": "data/asset/functions/object/%namespace%/summon/.mcfunction",
"content": [
"#> asset:object/%namespace%/summon/",
"#",
"# Object召喚処理の呼び出し時に実行されるfunction",
"#",
"# @within asset:object/alias/%id%/summon",
"",
"# 元となるEntityを召喚する",
" summon %entity% ~ ~ ~ {Tags:[\"ObjectInit\"]}",
"",
"# 実装フラグを立てる",
"data modify storage asset:object Implement set value true"
]
},
{
"type": "file",
"rel": "data/asset/functions/object/alias/%id%/summon.mcfunction",
"content": [
"#> asset:object/alias/%id%/summon",
"#",
"# Object召喚処理のエイリアス",
"#",
"# @within asset_manager:object/summon/summon.m",
"",
"# 元の召喚処理を呼び出す",
" function asset:object/%namespace%/summon/"
]
}
],
"customQuestion": [
{
"name": "id",
"question": "ObjectのID",
"pattern": "[1-9][0-9]*",
"patternErrorMessage": "数値のみが許されるよ"
},
{
"name": "entity",
"question": "元となるentity",
"pattern": "area_effect_cloud|armor_stand|arrow|axolotl|bat|bee|blaze|boat|cat|cave_spider|chest_minecart|chicken|cod|command_block_minecart|cow|creeper|dolphin|donkey|dragon_fireball|drowned|egg|elder_guardian|end_crystal|ender_dragon|ender_pearl|enderman|endermite|evoker|evoker_fangs|experience_bottle|experience_orb|eye_of_ender|falling_block|fireball|firework_rocket|fox|furnace_minecart|ghast|giant|glow_item_frame|glow_squid|goat|guardian|hoglin|hopper_minecart|horse|husk|illusioner|iron_golem|item|item_frame|leash_knot|lightning_bolt|llama|llama_spit|magma_cube|marker|minecart|mooshroom|mule|ocelot|painting|panda|parrot|phantom|pig|piglin|piglin_brute|pillager|polar_bear|potion|pufferfish|rabbit|ravager|salmon|sheep|shulker|shulker_bullet|silverfish|skeleton|skeleton_horse|slime|small_fireball|snow_golem|snowball|spawner_minecart|spectral_arrow|spider|squid|stray|strider|tnt|tnt_minecart|trader_llama|trident|tropical_fish|turtle|vex|villager|vindicator|wandering_trader|witch|wither|wither_skeleton|wither_skull|wolf|zoglin|zombie|zombie_horse|zombie_villager|zombified_piglin",
"patternErrorMessage": "Entityの名前のみが許されるよ"
}
]
},
{
"label": "Object/トリガー: tick",
"generates": [
{
"type": "file",
"rel": "data/asset/functions/object/%namespace%/tick/.mcfunction",
"content": [
"#> asset:object/%namespace%/tick/",
"#",
"# Objectのtick時の処理",
"#",
"# @within asset:object/alias/%id%/tick",
"",
"# Tick加算",
" scoreboard players add @s General.Object.Tick 1",
"",
"# 消滅処理",
" kill @s[scores={General.Object.Tick=1000..}]",
"",
"# 実装フラグを立てる",
"data modify storage asset:object Implement set value true"
]
},
{
"type": "file",
"rel": "data/asset/functions/object/alias/%id%/tick.mcfunction",
"content": [
"#> asset:object/alias/%id%/tick",
"#",
"# Tick時処理のエイリアス",
"#",
"# @within asset_manager:object/tick/tick.m",
"",
"# 元のTick処理を呼び出す",
" function asset:object/%namespace%/tick/"
]
}
],
"customQuestion": [
{
"name": "id",
"question": "ObjectのID",
"pattern": "[1-9][0-9]*",
"patternErrorMessage": "数値のみが許されるよ"
}
]
},
{
"label": "Object/トリガー: init",
"generates": [
{
"type": "file",
"rel": "data/asset/functions/object/%namespace%/init/.mcfunction",
"content": [
"#> asset:object/%namespace%/init/",
"#",
"# Objectのinit時の処理",
"#",
"# @within asset:object/alias/%id%/init",
""
]
},
{
"type": "file",
"rel": "data/asset/functions/object/alias/%id%/init.mcfunction",
"content": [
"#> asset:object/alias/%id%/init",
"#",
"# Init処理のエイリアス",
"#",
"# @within asset_manager:object/init/init.m",
"",
"# 元のInit処理を呼び出す",
" function asset:object/%namespace%/init/"
]
}
],
"customQuestion": [
{
"name": "id",
"question": "ObjectのID",
"pattern": "[1-9][0-9]*",
"patternErrorMessage": "数値のみが許されるよ"
}
]
},
{
"label": "Object/テンプレート: 初期化処理",
"generates": [
{
"type": "file",
"rel": "data/asset/functions/object/%namespace%/load.mcfunction",
"content": [
"#> asset:object/%namespace%/load",
"#",
"# Objectに利用するスコアボード等の初期化処理",
"#",
"# @within tag/function asset:object/load",
"",
"#> 定義類はここに",
"# @within function asset:object/%namespace%/**",
" scoreboard objectives add "
]
},
{
"type": "file",
"rel": "data/asset/tags/functions/object/load.json",
"content": {
"values": [
"asset:object/%namespace%/load"
]
},
"append": {
"addFirst": true,
"key": "values",
"elem": "asset:object/%namespace%/load"
}
}
]
},
{
"label": "Object/テンプレート: _index.d ",
"generates": [
{
"type": "file",
"rel": "data/asset/functions/object/%namespace%/_index.d.mcfunction",
"content": [
"#> asset:object/%namespace%/_index.d",
"# @private",
"",
"#> tag",
"# @within function asset:object/%namespace%/**",
" #declare"
]
}
]
},
{
"label": "Object/メソッド",
"generates": [
{
"type": "file",
"rel": "data/asset/functions/object/%namespace%/%method_name%/.mcfunction",
"content": [
"#> asset:object/%namespace%/%method_name%/",
"#",
"# 継承先などから実行される処理",
"#",
"# @within asset:object/alias/%id%/%method_name%",
"",
"# 実装フラグを立てる",
" data modify storage asset:object Implement set value true"
]
},
{
"type": "file",
"rel": "data/asset/functions/object/alias/%id%/%method_name%.mcfunction",
"content": [
"#> asset:object/alias/%id%/%method_name%",
"#",
"# メソッド処理のエイリアス",
"#",
"# @within asset_manager:object/tick/tick.m",
"",
"# 元のメソッド処理を呼び出す",
" function asset:object/%namespace%/%method_name%/"
]
}
],
"customQuestion": [
{
"name": "method_name",
"question": "メソッドの名前",
"pattern": "[a-z0-9./_-]*",
"patternErrorMessage": "使用できない文字が入っているようです"
},
{
"name": "id",
"question": "ObjectのID",
"pattern": "[1-9][0-9]*",
"patternErrorMessage": "数値のみが許されるよ"
}
]
},
],
"mcdutil.createDatapackTemplate.defaultFolder": false,
"mcdutil.createDatapackTemplate.defaultLoadAndTick": false,
Expand Down Expand Up @@ -2143,5 +2459,7 @@
"shortcode": ":balance_scale:",
"emoji": "⚖️"
}
]
],
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:artifact/0600.xtal/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:600} run function asset:artifact/0600.xtal/give/2.give
Loading

0 comments on commit 9735b60

Please sign in to comment.