地味に役立つニッチなコマンド百景【マインクラフト】

スポンサーリンク

ようこそお越しくださいました。ししゃもだよ。

(・∀・)ノ

データパックを時々配布させてもらってますが、コマンドって物によっては結構情報が少ないんですよね。基本的な使い方は、まぁwikiなんかで全然問題ないと思います。

ただ、実際にデータパックに組み込むとなると、思うように動かないことがしばしば、って言うかいつも……。

コマンドはいつも動かず怒髪冠を衝く!!

いつもファ〇キュー!!全然情報ねぇじゃん!!ってなるので、見つけるのに苦労した書き方を残していくようにします。皆様の参考になれば嬉しいの助!!

1.16以降の修正点、投げられたポーションを検知する方法
nbt={Potion:{}}で検知できなくなってます。 nbt={Item:{}} で検知できるよ。

いい加減、こういう細かい変更をどこかに書いてくれって思う……。

ニッチなコマンド集、うまく使ってね!!

#動かないおっさん、レティクル向けると場所(名前)表示 (南向き)
/summon minecraft:villager ~ ~ ~ {Silent:1,NoAI:1,Rotation:[0.0f,0.0f],CustomName:”\”○○へ\””}

#アナウンスとワープ
/tell @p ○○へテレポートします
/title @p subtitle {“text”:”\u3077\u3063\u3053\u6751\u897f\u90e8″}
/title @p title {“text”:”\u30ea\u30be\u30fc\u30c8\u533a”}

#プレイヤーのヘルス取得
/data get entity @s Health

#nbtのTagsを持ったアイテムのデータ取得とtpについて
#nbtにタグを持たせることで、tpの対象に選択可能

/give @s potion{Itemname:Bottle,Tags:[bottle]}
/data get entity @e[nbt={Item:{tag:{Tags:[bottle]}}},limit=1]
/execute if entity @e[tag=aaa] run tp @e[tag=aaa] @e[nbt={Item:{tag:{Tags:[bottle]}}},distance=..4,limit=1,sort=nearest]

#プレイヤーのscoreboard から値を取得して代入 プレイヤーの水平方向のみ取得してアマスタに持たせる /execute store result score @a[tag=Fire] direction run data get entity @p Rotation[0] 1
/execute as @a[tag=Fire] run summon minecraft:armor_stand ~ ~ ~ {Tags:[Direction],NoGravity:1,Invisible:1}
/execute store result entity @e[type=minecraft:armor_stand,tag=Direction,limit=1,sort=nearest] Rotation[0] float 1 at @a[tag=Fire] run scoreboard players get @p[tag=Fire] direction

#nbtのTagsは複数可能
/summon minecraft:armor_stand ~ ~ ~ {Tags:[aaa,bbb]}

#ドロッパーの疑似作業台で、tag持ち等の諸条件でアイテムを判定
/execute as @e[tag=aaa] at @s if block ~ ~-0.5 ~ minecraft:dropper{Items:[{Slot:4b,id:”minecraft:book”,tag:{Tags:[aaa]},Count:1b}]} run function spells:tool
/give_gbook/execute as @e[tag=aaa] at @s if block ~ ~-0.5 ~ minecraft:dropper{Items:[{Slot:5b,id:”minecraft:splash_potion”,tag:{ItemName:”Bottled_Golem”},Count:1b}]} run function spells:tool/give_gbook

#落ちてる虫取りビンの周囲2マスにハチがいたら小麦のタネをシュポーンと召喚
/execute as @e[type=minecraft:item,nbt={Item:{id:”minecraft:glass_bottle”}}] if entity @e[type=minecraft:bee,distance=..2] at @s run summon minecraft:item ~ ~ ~ {Motion:[0.0,0.5,0.0],Item:{id:”minecraft:wheat_seeds”,Count:1b}}

#NoAIなハチを頭上に召喚、目の前にバラをドロップ(召喚)させる
/summon minecraft:bee ^ ^3 ^ {NoAI:1,CustomName:”{\”text\”:\”My Bee\”}”,Tags:[My_Bee]}
/execute as @e[tag=My_Bee] run summon item ^ ^ ^2 {Item:{id:”minecraft:rose_bush”,Count:1b}}

↑Passengers:[{id:zombie}]でゾンビが乗った状態 villager 等も可能

#特定のエンティティと同じ方を向いているものとしてsetblock
/execute rotated as @e[type=minecraft:bee,limit=1,sort=nearest] run setblock ^ ^ ^3 minecraft:farmland

#タグ付き北向きプレイヤーの取得とsetコマンド(※180以上も使える)
/execute as @a[y_rotation=157.5..202.5,tag=aaa] run setblock ^ ^ ^3 minecraft:acacia_log

#matchesを使った構文#真南向きを検出
/execute as @a[tag=aaa] unless score @s GHoeDirection matches -338..-23 run summon etc…

#「Magical_Pot」タグの付いたエンティティの下がドロッパーで、スロットの真ん中(4b)とその上(1b)に植木鉢、バラの低木が各一個入ってたら頭上に村人召喚。ドロッパー内削除
/execute as @e[tag=Magical_Pot] at @s if block ~ ~-0.5 ~ minecraft:dropper{Items:[{Slot:1b,id:”minecraft:rose_bush”,Count:1b},{Slot:4b,id:”minecraft:flower_pot”,Count:1b}]} run summon minecraft:villager ~ ~3 ~
/execute as @e[tag=Magical_Pot] at @s if block ~ ~-0.5 ~ minecraft:dropper{Items:[{Slot:1b,id:”minecraft:rose_bush”,Count:1b},{Slot:4b,id:”minecraft:flower_pot”,Count:1b}]} run data merge block ~ ~-1 ~ {Items:{}}

#drillタグの付いた南向き、重力無視のアーマースタンド
/summon minecraft:armor_stand ^ ^ ^3 {Invisible:1,NoGravity:1,Rotation:[0f,0f],Tags:[drill]}

#title
/title SisyamoNeko subtitle {“text”:”No more MAGMADIVE!”, “italic”:true, “color”:”red”}
/title SisyamoNeko title {“text”:”ABM”, “bold”:true, “italic”:true, “color”:”gold”}

#体力増強効果付与
/effect give @a health_boost 999999 10 true

#No!!コマブロ出力
/gamerule commandBlockOutput false

#チャットにdataとかの取得地が表示されない時!!
/gamerule sendCommandFeedback true

#でっかいたき火
/summon minecraft:armor_stand ~ ~ ~ {Invulnerable:1,Invisible:1,NoGravity:1,Fire:999999,Passengers:[{id:Fireball}]}

#ボスバー
/bossbar add spells:mp “MP”

#data merge exsample ブタに真上を向かせる
/data merge entity @e[type=pig,limit=1,sort=nearest] {Rotation:[0f,-90f]}

#村人の取引スロット弄り
/summon villager ~ ~1 ~ {VillagerData:{profession:farmer,level:2,type:plains}}
/data modify entity @e[type=villager,sort=nearest,limit=1] Offers.Recipes insert -3 value {buy:{id:”stone”,Count:1},sell:{id:”diamond_block”,Count:64},maxUses:1000}

#絵画変更
/data merge entity @e[type=minecraft:painting,limit=1,sort=nearest] {Motive:”Kebab”}

#ようこそ的な恰好のアマスタ
/summon armor_stand ~ ~ ~ {Invulnerable:1b,NoBasePlate:1b,ShowArms:1b,Rotation:[20f],CustomName:”{\”text\”:\”mincrafterししゃも\”}”,CustomNameVisible:1b,Pose:{Body:[0f,6f,0f],Head:[345f,18f,0f],LeftLeg:[6f,0f,0f],RightLeg:[351f,0f,0f],LeftArm:[334f,0f,340f],RightArm:[215f,0f,340f]}}

てな感じで、またまとまって増えたら追加します。ちょっとココわかんないんだけど?みたいなのがあったら言ってください。

それではこの辺で、お帰りの際はお気をつけて~(・∀・)ノシ

コメント