Minecraft Japan Communityを発足しました!参加はこちらから!!

/attribute コマンドの使用方法

Minecraft

この記事はMinecraft 1.16.1 時点の情報です。

概要

ターゲットの属性値の確認と変更が行えるコマンド。

プレイヤーの防具耐性の合計を取得したり変更したりできます。
基本値を底上げして通常以上に強化された状態にもできます。

構文

/attribute <target> <attribute> [base] get [<scale>]
/attribute <target> <attribute> base set <value>
/attribute <target> <attribute> modifier add <uuid> <name> <value> (add|multiply|multiply_base)
/attribute <target> <attribute> modifier remove <uuid>
/attribute <target> <attribute> modifier value get <uuid> [<scale>]

詳細

属性値の合計を取得

/attribute <target> <attribute> get [<scale>]

属性値の基本値を取得

/attribute <target> <attribute> base get [<scale>]

属性値の基本値を上書き

/attribute <target> <attribute> base set <value>

UUIDを使用して属性修飾子を追加

/attribute <target> <attribute> modifier add <uuid> <name> <value> (add|multiply|multiply_base)

UUIDを使用して属性修飾子を削除

/attribute <target> <attribute> modifier remove <uuid>

UUIDを使用して属性修飾子を取得

/attribute <target> <attribute> modifier value get <uuid> [<scale>]

引数

<target>

属性操作を行うエンティティを指定。プレイヤー、アーマースタンド、MOBのみ指定可能です。

<attribute>

属性操作を行う属性をIDで指定します。

<scale>

値返却時に乗算される数値を指定します。

<uuid>

修飾子のUUIDをハイフン付き16進数のUUIDで指定します。
同じUUIDを持つことはできない。

防具の属性基本値を100に設定

/attribute @s minecraft:generic.armor base set 100

指定したエンティティにhogemoge修飾子を10で追加

/attribute 2b5465e2-b8bf-4a6e-81b8-b5bdf28a0508 minecraft:generic.max_health modifier add 2d414faf-43ca-4966-8e4a-561d4ae6f96e hogemoge 10 add

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

モバイルバージョンを終了