-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
244 additions
and
6 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
Asset/data/asset/functions/mob/0400.explosion_spellbook/_/death.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#> asset:mob/0400.explosion_spellbook/_/death | ||
# | ||
# Mobの死亡時に実行されるfunction | ||
# | ||
# @within tag/function asset:mob/death | ||
|
||
execute if data storage asset:context {id:400} run function asset:mob/0400.explosion_spellbook/death/ |
7 changes: 7 additions & 0 deletions
7
Asset/data/asset/functions/mob/0400.explosion_spellbook/_/init.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#> asset:mob/0400.explosion_spellbook/_/init | ||
# | ||
# Mobの召喚時に実行されるfunction | ||
# | ||
# @within tag/function asset:mob/initialize | ||
|
||
execute if data storage asset:context {id:400} run function asset:mob/0400.explosion_spellbook/init/ |
7 changes: 7 additions & 0 deletions
7
Asset/data/asset/functions/mob/0400.explosion_spellbook/_/register.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#> asset:mob/0400.explosion_spellbook/_/register | ||
# | ||
# | ||
# | ||
# @within tag/function asset:mob/register | ||
|
||
execute if data storage asset:context {id:400} run function asset:mob/0400.explosion_spellbook/register |
7 changes: 7 additions & 0 deletions
7
Asset/data/asset/functions/mob/0400.explosion_spellbook/_/summon.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#> asset:mob/0400.explosion_spellbook/_/summon | ||
# | ||
# | ||
# | ||
# @within tag/function asset:mob/summon | ||
|
||
execute if data storage asset:context {id:400} run function asset:mob/0400.explosion_spellbook/summon/ |
7 changes: 7 additions & 0 deletions
7
Asset/data/asset/functions/mob/0400.explosion_spellbook/_/tick.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#> asset:mob/0400.explosion_spellbook/_/tick | ||
# | ||
# Mobが生きている間毎tick実行されるfunction | ||
# | ||
# @within tag/function asset:mob/tick | ||
|
||
execute if data storage asset:context {id:400} run function asset:mob/0400.explosion_spellbook/tick/ |
6 changes: 6 additions & 0 deletions
6
Asset/data/asset/functions/mob/0400.explosion_spellbook/_index.d.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#> asset:mob/0400.explosion_spellbook/_index.d | ||
# @private | ||
|
||
#> tag | ||
# @within function asset:mob/0400.explosion_spellbook/** | ||
#declare tag B4.Explode |
32 changes: 32 additions & 0 deletions
32
Asset/data/asset/functions/mob/0400.explosion_spellbook/ai/explode/.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#> asset:mob/0400.explosion_spellbook/ai/explode/ | ||
# | ||
# 爆発する | ||
# | ||
# @within function asset:mob/0400.explosion_spellbook/tick/ | ||
|
||
# 爆発タグを付ける | ||
tag @s add B4.Explode | ||
|
||
# 演出 | ||
particle explosion_emitter ~ ~1 ~ 0 0 0 0 1 force @a[distance=..32] | ||
particle witch ~ ~1 ~ 2 2 2 1 100 force @a[distance=..32] | ||
playsound entity.generic.explode hostile @a[distance=..32] ~ ~ ~ 2 1 0 | ||
playsound entity.generic.explode hostile @a[distance=..32] ~ ~ ~ 2 1.01 0 | ||
|
||
# ダメージ | ||
# 引数の設定 | ||
# 与えるダメージ | ||
data modify storage lib: Argument.Damage set value 45.0f | ||
# 第一属性 | ||
data modify storage lib: Argument.AttackType set value "Magic" | ||
# デスログ | ||
data modify storage lib: Argument.DeathMessage append value '[{"translate": "%1$sの爆発によって%2$sは消し飛ばされた","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]' | ||
# 補正functionを実行 | ||
function lib:damage/modifier | ||
# ダメージを与える | ||
execute as @a[gamemode=!creative,distance=..4] at @s run function lib:damage/ | ||
# リセット | ||
function lib:damage/reset | ||
|
||
# キル | ||
kill @s |
8 changes: 8 additions & 0 deletions
8
Asset/data/asset/functions/mob/0400.explosion_spellbook/death/.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#> asset:mob/0400.explosion_spellbook/death/ | ||
# | ||
# Mobの死亡時の処理 | ||
# | ||
# @within function asset:mob/0400.explosion_spellbook/_/death | ||
|
||
# 死ぬ音 | ||
playsound minecraft:entity.zombie.break_wooden_door hostile @a ~ ~ ~ 0.6 0.7 |
8 changes: 8 additions & 0 deletions
8
Asset/data/asset/functions/mob/0400.explosion_spellbook/init/.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#> asset:mob/0400.explosion_spellbook/init/ | ||
# | ||
# Mob召喚時のInit処理 | ||
# | ||
# @within function asset:mob/0400.explosion_spellbook/_/init | ||
|
||
# スコア設定 | ||
scoreboard players set @s B4.Tick 0 |
9 changes: 9 additions & 0 deletions
9
Asset/data/asset/functions/mob/0400.explosion_spellbook/load.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#> asset:mob/0400.explosion_spellbook/load | ||
# | ||
# MOBに利用するスコアボード等の初期化処理 | ||
# | ||
# @within tag/function asset:mob/load | ||
|
||
#> 定義類はここに | ||
# @within function asset:mob/0400.explosion_spellbook/** | ||
scoreboard objectives add B4.Tick dummy |
68 changes: 68 additions & 0 deletions
68
Asset/data/asset/functions/mob/0400.explosion_spellbook/register.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#> asset:mob/0400.explosion_spellbook/register | ||
# | ||
# Mobのデータを指定 | ||
# | ||
# @within function asset:mob/0400.explosion_spellbook/_/register | ||
|
||
# 継承 (int) (オプション) | ||
# data modify storage asset:mob Extends append value | ||
# function asset:mob/extends | ||
|
||
# 他のモブに継承されることを許可するか (boolean) (オプション) | ||
# data modify storage asset:mob ExtendsSafe set value true | ||
# ID (int) | ||
data modify storage asset:mob ID set value 400 | ||
# Type (string) Wikiを参照 | ||
data modify storage asset:mob Type set value "Enemy" | ||
# 干渉可能か否か (boolean) | ||
data modify storage asset:mob Interferable set value true | ||
# 名前 (TextComponentString) (オプション) | ||
data modify storage asset:mob Name set value '{"text":"爆発の魔導書","color":"#FF8800"}' | ||
# Mobの説明文 (TextComponentString[]) (オプション) | ||
# data modify storage asset:mob Lore set value | ||
# 武器 | ||
# メインハンド (Compound(Item)) (オプション) | ||
# data modify storage asset:mob Weapon.Mainhand set value | ||
# オフハンド (Compound(Item)) (オプション) | ||
# data modify storage asset:mob Weapon.Offhand set value | ||
# 武器ドロップ率 ([float, float]) (オプション) | ||
# data modify storage asset:mob WeaponDropChances set value | ||
# 防具 | ||
# 頭 (Compound(Item)) (オプション) | ||
data modify storage asset:mob Armor.Head set value {id:"leather_horse_armor",Count:1b,tag:{CustomModelData:20138,display:{color:16746496}}} | ||
# 胴 (Compound(Item)) (オプション) | ||
# data modify storage asset:mob Armor.Chest set value | ||
# 脚 (Compound(Item)) (オプション) | ||
# data modify storage asset:mob Armor.Legs set value | ||
# 足 (Compound(Item)) (オプション) | ||
# data modify storage asset:mob Armor.Feet set value | ||
# 防具ドロップ率 ([float, float]) (オプション) | ||
# data modify storage asset:mob ArmorDropChances set value | ||
# 体力 (double) (オプション) | ||
data modify storage asset:mob Health set value 800 | ||
# 攻撃力 (double) (オプション) | ||
# data modify storage asset:mob AttackDamage set value | ||
# 防御力 (double) (オプション) // 被ダメージがある程度大きい場合1ptにつき0.8%カット、小さい場合1ptにつき約4%カット 20pt以上は頭打ち | ||
data modify storage asset:mob Defense set value 0 | ||
# 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす | ||
# data modify storage asset:mob SpecialDefense set value | ||
# 移動速度 (double) (オプション) | ||
# data modify storage asset:mob Speed set value | ||
# 索敵範囲 (double) (オプション) | ||
# data modify storage asset:mob FollowRange set value | ||
# ノックバック耐性 (double) (オプション) | ||
# data modify storage asset:mob KnockBackResist set value | ||
# 属性倍率 // 1.0fで100% 最低でも25%は軽減されずに入る | ||
# 物理倍率 (float) (オプション) | ||
data modify storage asset:mob Resist.Physical set value 1 | ||
# 魔法倍率 (float) (オプション) | ||
data modify storage asset:mob Resist.Magic set value 0 | ||
# 火倍率 (float) (オプション) | ||
data modify storage asset:mob Resist.Fire set value 1 | ||
# 水倍率 (float) (オプション) | ||
data modify storage asset:mob Resist.Water set value 1 | ||
# 雷倍率 (float) (オプション) | ||
data modify storage asset:mob Resist.Thunder set value 1 | ||
|
||
# フィールド | ||
# data modify storage asset:mob Field set value {} |
8 changes: 8 additions & 0 deletions
8
Asset/data/asset/functions/mob/0400.explosion_spellbook/summon/.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#> asset:mob/0400.explosion_spellbook/summon/ | ||
# | ||
# Mob召喚処理の呼び出し時に実行されるfunction | ||
# | ||
# @within asset:mob/0400.explosion_spellbook/_/summon | ||
|
||
# 元となるMobを召喚する | ||
summon zombie ~ ~ ~ {NoAI:1b,Silent:1b,Tags:["MobInit","AlwaysInvisible"],DeathLootTable:"asset:mob/death/0400.explosion_spellbook"} |
10 changes: 10 additions & 0 deletions
10
Asset/data/asset/functions/mob/0400.explosion_spellbook/summon/debug.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#> asset:mob/0400.explosion_spellbook/summon/debug | ||
# | ||
# モブの動作チェック用の召喚処理 使い終わったら消してもいいかも | ||
# | ||
# @user | ||
# @private | ||
|
||
# モブを召喚 | ||
data modify storage api: Argument.ID set value 400 | ||
function api:mob/summon |
28 changes: 28 additions & 0 deletions
28
Asset/data/asset/functions/mob/0400.explosion_spellbook/tick/.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#> asset:mob/0400.explosion_spellbook/tick/ | ||
# | ||
# Mobのtick時の処理 | ||
# | ||
# @within function asset:mob/0400.explosion_spellbook/_/tick | ||
|
||
# パーティクル | ||
particle enchant ~ ~1.68 ~ 0.25 0.25 0.25 0 2 force @a[distance=..40] | ||
|
||
# 接地で上を向く | ||
execute unless block ~ ~-0.1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~-35 | ||
execute unless block ~ ~1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~80 | ||
|
||
# カベにぶつかった際の処理 | ||
execute at @s unless block ^ ^ ^0.5 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 | ||
execute at @s unless block ^ ^ ^0.2 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 | ||
|
||
# 範囲内ならホーミングじみた移動 | ||
execute facing entity @p feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s feet positioned as @s run tp @s ^ ^ ^0.2 ~ ~ | ||
|
||
# スコア増やす | ||
scoreboard players add @s B4.Tick 1 | ||
|
||
# プレイヤーが近くにいたら爆発 | ||
execute if entity @p[gamemode=!spectator,distance=..2] run function asset:mob/0400.explosion_spellbook/ai/explode/ | ||
|
||
# 時間が経過したら爆発 | ||
execute if score @s B4.Tick matches 500 run function asset:mob/0400.explosion_spellbook/ai/explode/ |
20 changes: 20 additions & 0 deletions
20
Asset/data/asset/loot_tables/mob/death/0400.explosion_spellbook.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"type": "entity", | ||
"pools": [ | ||
{ | ||
"rolls": 1, | ||
"entries": [ | ||
{ | ||
"type": "loot_table", | ||
"name": "asset:mob/death/abstract_detect_item", | ||
"functions": [ | ||
{ | ||
"function": "set_nbt", | ||
"tag": "{TSB:{ID:400}}" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters