Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
115d124
だいたいテンプレート
Lapis-LJA Sep 3, 2026
a5c07d8
基本形完成
Lapis-LJA Sep 3, 2026
913bfcf
演出以外の仕様完成
Lapis-LJA Sep 4, 2026
046f394
レッドシャードに追加
Lapis-LJA Sep 4, 2026
e9d46c5
ベクトルが0の時に実行しない、という処理を無効化
Lapis-LJA Sep 5, 2026
ff77583
[Object 1186] 次元の扉を作成
Lapis-LJA Sep 8, 2026
1457008
次元の扉の演出を追加
Lapis-LJA Sep 8, 2026
e45adc1
壁貫通処理対策を厳密化
Lapis-LJA Sep 11, 2026
05d09b3
判定を厳密化2
Lapis-LJA Sep 11, 2026
3f57f6a
完成
Lapis-LJA Sep 11, 2026
0ee2a54
演出を調整
Lapis-LJA Sep 11, 2026
e25fb86
数値調整
Lapis-LJA Sep 11, 2026
3591ed3
header修正
Lapis-LJA Sep 11, 2026
2dfa602
判定を厳密に
Lapis-LJA Sep 11, 2026
4620f47
判定をもっと厳密に
Lapis-LJA Sep 11, 2026
bd1d610
エラー修正
Lapis-LJA Sep 11, 2026
e88ab25
性能調整
Lapis-LJA Sep 11, 2026
0125d7e
scale調整
Lapis-LJA Sep 11, 2026
6aa2b9d
謎改行を消す
Lapis-LJA Sep 11, 2026
7ea0f06
所持数が2以上の時に1本ホットバーから追い出すとバフが消える問題を修正
Lapis-LJA Sep 11, 2026
c8216a2
ワープ可能バフ獲得時の演出を調整
Lapis-LJA Sep 12, 2026
6c34c1b
次元斬エフェクトを調整
Lapis-LJA Sep 12, 2026
89b24d3
Merge branch 'master' into dev/lapis_artifact1606
Lapis-LJA Sep 12, 2026
ac3a020
細かいとこ調整
Lapis-LJA Sep 12, 2026
eddb39c
left_rotationの初期値をほんとに初期値って感じに
Lapis-LJA Sep 12, 2026
b68f14a
フレーバーテキスト追加
Lapis-LJA Sep 12, 2026
ff8acea
表記を修正
Lapis-LJA Sep 13, 2026
df33cef
壁貫通対策
Lapis-LJA Sep 14, 2026
ea3e45c
消滅処理を修正
Lapis-LJA Sep 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:artifact/1606.dimension_knife/click/1.trigger
#
#
#
# @within tag/function asset:artifact/**

# storage asset:idのmainhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
execute if data storage asset:context id{mainhand:1606} run function asset:artifact/1606.dimension_knife/click/2.check_condition
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#> asset:artifact/1606.dimension_knife/click/2.check_condition
#
#
#
# @within function asset:artifact/1606.dimension_knife/click/1.trigger

# 基本的なチェック
function asset:artifact/common/check_condition/mainhand

# バフがあるかチェック
data modify storage api: Argument.ID set value 387
function api:entity/mob/effect/get/from_id
execute unless data storage api: Return.Effect run tag @s remove CanUsed
execute if entity @s[tag=!CanUsed] run return fail

# 前方に敵がいるかどうか
function asset:artifact/1606.dimension_knife/click/2.check_condition/find_enemy/

# ターゲットがいなければCanUsedを削除
execute unless entity @e[type=#lib:living_without_player,tag=Target,distance=..20] run tag @s remove CanUsed
execute if entity @s[tag=!CanUsed] run function asset:artifact/1606.dimension_knife/click/2.check_condition/reset
execute if entity @s[tag=!CanUsed] run return fail

# ターゲットの背後がブロックに埋まっている場合、CanUsedを削除
execute positioned as @e[type=#lib:living_without_player,tag=Target,distance=..20,limit=1] rotated ~ 0 unless function asset:artifact/1606.dimension_knife/click/2.check_condition/check_block/check_safe run tag @s remove CanUsed
execute if entity @s[tag=!CanUsed] run function asset:artifact/1606.dimension_knife/click/2.check_condition/reset
execute if entity @s[tag=!CanUsed] run return fail

# 実行
function asset:artifact/1606.dimension_knife/click/3.main
tag @s remove CanUsed

# リセット
function asset:artifact/1606.dimension_knife/click/2.check_condition/reset
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset:artifact/1606.dimension_knife/click/2.check_condition/check_block/check_safe
#
#
#
# @within function asset:artifact/1606.dimension_knife/click/2.check_condition

# ワープ先は厳密に判定する
execute positioned ^ ^ ^1.6 unless function asset:artifact/1606.dimension_knife/click/2.check_condition/check_block/player_hit_box run return 0

# 敵のすぐ背後も判定する
execute positioned ^ ^ ^1.5 unless function asset:artifact/1606.dimension_knife/click/2.check_condition/check_block/player_hit_box run return 0
execute positioned ^ ^ ^1.0 unless function asset:artifact/1606.dimension_knife/click/2.check_condition/check_block/player_hit_box run return 0
execute positioned ^ ^ ^0.5 unless function asset:artifact/1606.dimension_knife/click/2.check_condition/check_block/player_hit_box run return 0

# 成功
return 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#> asset:artifact/1606.dimension_knife/click/2.check_condition/check_block/player_hit_box
#
#
#
# @within function asset:artifact/1606.dimension_knife/click/2.check_condition/check_block/check_safe

execute unless block ^0.3 ^0.1 ^0.3 #lib:no_collision/ run return 0
execute unless block ^-0.3 ^0.1 ^0.3 #lib:no_collision/ run return 0
execute unless block ^0.3 ^0.1 ^-0.3 #lib:no_collision/ run return 0
execute unless block ^-0.3 ^0.1 ^-0.3 #lib:no_collision/ run return 0

execute unless block ^0.3 ^1 ^0.3 #lib:no_collision/ run return 0
execute unless block ^-0.3 ^1 ^0.3 #lib:no_collision/ run return 0
execute unless block ^0.3 ^1 ^-0.3 #lib:no_collision/ run return 0
execute unless block ^-0.3 ^1 ^-0.3 #lib:no_collision/ run return 0

execute unless block ^0.3 ^1.8 ^0.3 #lib:no_collision/ run return 0
execute unless block ^-0.3 ^1.8 ^0.3 #lib:no_collision/ run return 0
execute unless block ^0.3 ^1.8 ^-0.3 #lib:no_collision/ run return 0
execute unless block ^-0.3 ^1.8 ^-0.3 #lib:no_collision/ run return 0

# 成功
return 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#> asset:artifact/1606.dimension_knife/click/2.check_condition/find_enemy/
#
#
#
# @within function asset:artifact/1606.dimension_knife/click/2.check_condition

# 再帰用データ
scoreboard players set $RecursiveLimit Temporary 16

# 飛ばす用のマーカーを召喚
summon marker ~ ~ ~ {Tags:["RecursiveMarker"]}
execute anchored eyes positioned ^ ^ ^ run tp @e[type=marker,tag=RecursiveMarker,distance=..5] ~ ~ ~ ~ ~

# 視線先から再帰
execute as @e[type=marker,tag=RecursiveMarker,distance=..5] at @s positioned ^ ^ ^-0.5 run function asset:artifact/1606.dimension_knife/click/2.check_condition/find_enemy/recursive

# リセット
kill @e[type=marker,tag=RecursiveMarker,distance=..30]
scoreboard players reset $RecursiveLimit Temporary
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#> asset:artifact/1606.dimension_knife/click/2.check_condition/find_enemy/recursive
#
#
#
# @within function
# asset:artifact/1606.dimension_knife/click/2.check_condition/find_enemy/
# asset:artifact/1606.dimension_knife/click/2.check_condition/find_enemy/recursive

# デクリメント
scoreboard players remove $RecursiveLimit Temporary 1
# return
# 再帰限界
execute if score $RecursiveLimit Temporary matches ..0 run return fail
# 前方判定
execute unless block ^ ^ ^0.5 #lib:no_collision/ run return fail
# 各ベクトル判定
execute positioned 0.0 0.0 0.0 positioned ^ ^ ^-1 positioned ~ 0.0 0.0 positioned ^ ^ ^0.5 facing 0.0 0.0 0.0 positioned as @s positioned ^ ^ ^0.25 rotated as @s positioned ^ ^ ^0.25 unless block ~ ~ ~ #lib:no_collision/ run return fail
execute rotated ~180 ~ positioned ^ ^ ^0.25 rotated ~-180 ~ positioned ^ ^ ^0.25 unless block ~ ~ ~ #lib:no_collision/ run return fail
execute positioned 0.0 0.0 0.0 positioned ^ ^ ^-1 positioned 0.0 0.0 ~ positioned ^ ^ ^0.5 facing 0.0 0.0 0.0 positioned as @s positioned ^ ^ ^0.25 rotated as @s positioned ^ ^ ^0.25 unless block ~ ~ ~ #lib:no_collision/ run return fail

# 敵がいればtagを付与して終了
execute positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#lib:living_without_player,tag=Enemy,dx=0,limit=1] run return run tag @s add Target

# 前に進む
tp @s ^ ^ ^0.5

# 再帰
execute at @s run function asset:artifact/1606.dimension_knife/click/2.check_condition/find_enemy/recursive
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:artifact/1606.dimension_knife/click/2.check_condition/reset
#
#
#
# @within function asset:artifact/1606.dimension_knife/click/2.check_condition

tag @e[type=#lib:living_without_player,tag=Target,distance=..20] remove Target
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#> asset:artifact/1606.dimension_knife/click/3.main
#
#
#
# @within function asset:artifact/1606.dimension_knife/click/2.check_condition

# ワープができるようになるバフ削除
data modify storage api: Argument.ID set value 387
function api:entity/mob/effect/remove/from_id
function api:entity/mob/effect/reset

# ワープ直後の性能を盛るバフを付与
data modify storage api: Argument.ID set value 388
data modify storage api: Argument.Duration set value 60
function api:entity/mob/effect/give
function api:entity/mob/effect/reset

# AttackCountをリセット
scoreboard players reset @s 18M.AttackCount

# ターゲットの背後にワープ
execute positioned as @e[type=#lib:living_without_player,tag=Target,distance=..20,limit=1] rotated ~ 0 positioned ^ ^1.8 ^1.6 run tp @s ~ ~ ~ facing entity @e[type=#lib:living_without_player,tag=Target,distance=..20,limit=1] feet

# 演出
playsound entity.enderman.teleport player @a ~ ~ ~ 1 1.3
execute at @s run playsound entity.enderman.teleport player @a ~ ~ ~ 1 1.3

# Object召喚
data modify storage api: Argument.ID set value 1186
execute anchored eyes positioned ^ ^ ^3 facing ^ ^ ^-1 run function api:object/summon

data modify storage api: Argument.ID set value 1186
execute at @s anchored eyes positioned ^ ^ ^-1.5 run function api:object/summon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:artifact/1606.dimension_knife/dis_equip/1.trigger
#
#
#
# @within tag/function asset:artifact/**

execute if data storage asset:context id{hotbar:[1606]} run function asset:artifact/1606.dimension_knife/dis_equip/2.main
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset:artifact/1606.dimension_knife/dis_equip/2.main
#
#
#
# @within function asset:artifact/1606.dimension_knife/dis_equip/1.trigger

#> prv
# @private
#declare score_holder $ItemCount

# まだ持ってるか確認する
execute store result score $ItemCount Temporary if data storage asset:context New.Items.hotbar[{tag:{TSB:{ID:1606}}}]
# なければ削除
execute if score $ItemCount Temporary matches ..0 run function asset:artifact/1606.dimension_knife/dis_equip/remove_buff
# リセット
scoreboard players reset $ItemCount Temporary
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#> asset:artifact/1606.dimension_knife/dis_equip/remove_buff
#
#
#
# @within function asset:artifact/1606.dimension_knife/dis_equip/2.main

# バフ削除
data modify storage api: Argument.ID set value 387
function api:entity/mob/effect/remove/from_id
function api:entity/mob/effect/reset

# バフ削除
data modify storage api: Argument.ID set value 388
function api:entity/mob/effect/remove/from_id
function api:entity/mob/effect/reset
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:artifact/1606.dimension_knife/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:1606} run function asset:artifact/1606.dimension_knife/give/2.give
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#> asset:artifact/1606.dimension_knife/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/1606.dimension_knife/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
data modify storage asset:artifact ID set value 1606
# 神器のベースアイテム
data modify storage asset:artifact Item set value "minecraft:carrot_on_a_stick"
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '[{"text":"残された次元ナイフ","color":"#c762e7"}]'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text":"ホットバーに保持して40m移動するとワープが可能になり"}','{"translate":"敵を前方に捉えて%1$sを押すと","with":[{"keybind":"key.use"}]}','{"text":"対象の背後にワープする"}','{"text":"ワープ直後、最初の近接攻撃3回のMP回復量+50%"}','{"text":"次元の狭間に落ち、忘れられた者の短剣","color":"gray"}']
# 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション)
# data modify storage asset:artifact ConsumeItem.Item set value '{"translate":"item.minecraft.stick"}'
# data modify storage asset:artifact ConsumeItem.Count set value 1
# data modify storage asset:artifact ConsumeItem.Extra set value
# 使用回数 (int) (オプション)
# data modify storage asset:artifact RemainingCount set value
# 神器を発動できるスロット (string) Wikiを参照
data modify storage asset:artifact Slot set value "mainhand"
# 神器のトリガー (string) Wikiを参照
data modify storage asset:artifact Trigger set value "onAttackByMelee"
# 神器の発動条件 (TextComponentString) (オプション)
# data modify storage asset:artifact Condition set value
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.Damage set value [130,200]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.AttackType set value [Physical]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.ElementType set value [Thunder]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.IsRangeAttack set value "never"
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
# data modify storage asset:artifact MPCost set value
# MP必要量 (int) (オプション)
# data modify storage asset:artifact MPRequire set value
# MP回復量 (int)
data modify storage asset:artifact MPHealWhenHit set value 6
# 神器のクールダウン (int) (オプション)
# data modify storage asset:artifact LocalCooldown set value
# 種別クールダウン ({Type: string, Duration: int}) (オプション)
data modify storage asset:artifact TypeCooldown.Type set value "shortRange"
data modify storage asset:artifact TypeCooldown.Duration set value 7
# グローバルクールダウン (int) (オプション)
# data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
data modify storage asset:artifact DisableCooldownMessage set value true
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
# data modify storage asset:artifact DisableMPMessage set value
# 破壊時の音を鳴らさないかどうか (boolean) (オプション)
# data modify storage asset:artifact DisableBreakSound set value
# 扱える神 (string[]) Wikiを参照
data modify storage asset:artifact CanUsedGod set value ["Flora", "Urban", "Nyaptov"]
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
# data modify storage asset:artifact CustomNBT set value {}

# 神器の入手用function
function asset:artifact/common/give
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:artifact/1606.dimension_knife/register
#
# 神器プールへの登録処理
#
# @within tag/function asset:artifact/register

data modify storage asset:artifact RarityRegistry[4] append value [1606]
data modify storage asset:artifact RarityRegistryWithColor.Red[4] append value [1606]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:artifact/1606.dimension_knife/tick/1.trigger
#
#
#
# @within tag/function asset:artifact/**

# storage asset:idの%slot%に装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
execute if data storage asset:context id{hotbar:[1606]} run function asset:artifact/1606.dimension_knife/tick/2.check_condition
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#> asset:artifact/1606.dimension_knife/tick/2.check_condition
#
#
#
# @within function asset:artifact/1606.dimension_knife/tick/1.trigger

# ID指定する
data modify storage asset:artifact TargetID set value 1606
# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く
data modify storage asset:artifact DisabledCheckFlag set value {TypeCooldown:true,BelieveMessage:true,Believe:false}
function asset:artifact/common/check_condition/hotbar
# 他にアイテム等確認する場合はここに書く

# fail
execute if entity @s[tag=!CanUsed] run return fail

# ベクトルが全て0の時、失敗
#
# execute if data storage api: Return{Vector:[0.0d,0.0d,0.0d]} run tag @s remove CanUsed
# execute if entity @s[tag=!CanUsed] run return fail

# バフがある間加算しない
data modify storage api: Argument.ID set value 387
function api:entity/mob/effect/get/from_id
execute if data storage api: Return.Effect run tag @s remove CanUsed
execute if entity @s[tag=!CanUsed] run return fail

data modify storage api: Argument.ID set value 388
function api:entity/mob/effect/get/from_id
execute if data storage api: Return.Effect run tag @s remove CanUsed
execute if entity @s[tag=!CanUsed] run return fail

# 3.main.mcfunctionを実行する
function asset:artifact/1606.dimension_knife/tick/3.main
tag @s remove CanUsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#> asset:artifact/1606.dimension_knife/tick/3.main
#
#
#
# @within function asset:artifact/1606.dimension_knife/tick/2.check_condition

#> Private
# @private
#declare score_holder $VectorX
#declare score_holder $VectorZ

# ベクトル取得
function api:player_vector/get
execute store result score $VectorX Temporary run data get storage api: Return.Vector[0] 100
execute store result score $VectorZ Temporary run data get storage api: Return.Vector[2] 100

# どちらかのベクトルの絶対値が100を超えてるなら計算に含まない
execute unless score $VectorX Temporary matches -10000..10000 run data modify storage asset:temp NotInclude set value true
execute unless score $VectorZ Temporary matches -10000..10000 run data modify storage asset:temp NotInclude set value true

#
# execute unless data storage api: Return{Vector:[0d,0d,0d]} run tellraw @a {"storage":"api:","nbt":"Return.Vector"}

# abs
execute if score $VectorX Temporary matches ..-1 run scoreboard players operation $VectorX Temporary *= $-1 Const
execute if score $VectorZ Temporary matches ..-1 run scoreboard players operation $VectorZ Temporary *= $-1 Const

# 加算
execute unless data storage asset:temp {NotInclude:true} run scoreboard players operation $VectorX Temporary += $VectorZ Temporary
execute unless data storage asset:temp {NotInclude:true} run scoreboard players operation @s 18M.MoveSum += $VectorX Temporary

# 値が一定以上なら発動
execute if score @s 18M.MoveSum matches 4000.. run function asset:artifact/1606.dimension_knife/tick/give_buff

# リセット
data remove storage asset:temp NotInclude
scoreboard players reset $VectorX Temporary
scoreboard players reset $VectorZ Temporary
Loading
Loading