About
位置 (-1920,14,-181)
呼び出し元 毎tick実行するコマンド群5
レガシーアイテムの使用時の演出と破壊処理を行う。
コマンド群
| No. | コマンド | 状態 |
|---|---|---|
| 1 | /execute @a[tag=Legacy] ~ ~ ~ /scoreboard players operation @a[c=1] Random = @a[c=1] RndMWC | |
| 2 | /scoreboard players tag @a[tag=Legacy] add UpdateRandom | |
| 3 | /scoreboard players operation @a[tag=Legacy] Random %= #LegacyWeight Const | |
| 4 | /scoreboard players tag @a[tag=Legacy,score_Random=0] add LegacyBreak {SelectedItem:{tag:{Legacy:true}}} | |
| 5 | /replaceitem entity @a[tag=LegacyBreak] slot.weapon minecraft:air | 条件付き |
| 6 | /execute @a[tag=LegacyBreak] ~ ~ ~ /particle iconcrack ~ ~1.52 ~ 0 0 0 0.1 30 force @a[r=64] 373 | 条件付き |
| 7 | /execute @a[tag=LegacyBreak] ~ ~ ~ /playsound entity.item.break master @a[r=16] ~ ~ ~ 1 0.5 0 | 条件付き |
| 8 | /scoreboard players tag @a[tag=LegacyBreak] remove LegacyBreak | 条件付き |
| 9 | /execute @a[tag=Legacy] ~ ~ ~ /playsound entity.wither.death master @a ~ ~ ~ 0.3 2 0 | |
| 10 | /execute @a[tag=Legacy] ~ ~ ~ /particle endRod ~ ~1.52 ~ 0.1 0.1 0.1 0.3 90 force | |
| 11 | /scoreboard players tag @a[tag=Legacy] remove Legacy |
詳細
Legacyを持つすべてのプレイヤーのRandomにRndMWCを代入Legacyを持つすべてのプレイヤーにUpdateRandomを付与Legacyを持つすべてのプレイヤーに対して、\(\text{Random}=\text{Random}\div 7\text{(LegacyWeight)}\)を実行Legacyを持ち、Randomが0以下であり、メインハンドにLegacyタグを持つアイテムを持っているすべてのプレイヤーに対し、LegacyBreakを付与し、以下の事柄を実行LegacyBreakを持っているすべてのプレイヤーのメインハンドに持っているアイテムを空気ブロックに変更 (要はレガシーアイテムを削除している。スタックされたレガシーアイテムが丸ごと消去されてしまう原因?もここにある。)LegacyBreakを持つプレイヤーに対して、演出を実行LegacyBreakを持つすべてのプレイヤーからLegacyBreakを削除
Legacyを持つすべてのプレイヤーに対して、演出を実行Legacyを持つすべてのプレイヤーからLegacyを削除