Minecraft Wiki

除另有声明,转载时均必须注明出处若簡繁轉換出錯,請以遊戲內為準请勇于扩充与修正内容有兴趣逛逛我们的微博沟通交流,欢迎到社区专页需要协助,请在告示板留言

了解更多

Minecraft Wiki
→‎历史
([InPageEdit])
第1行: 第1行:
  +
{{snapshot|edition=java}}
{{trans|n}}
 
 
{{exclusive|java}}
 
{{exclusive|java}}
 
<onlyinclude>
 
<onlyinclude>
第62行: 第62行:
   
 
[[en:Commands/attribute]]
 
[[en:Commands/attribute]]
  +
[[pt:Comandos/attribute]]

2020年4月23日 (四) 00:37的版本

Grass Block
本页面包含会在下一次更新中出现的内容。

这些特性已经在开发版本中出现,但包含这些特性的正式更新尚未发布。

Information icon
此特性为Java版独有。

命令/infobox 用于更改或读取属性

语法
attribute <target> <attribute> (get|base|modifier)
... get [<scale>]
... base get [<scale>]
... base set <value>
... modifier (add|remove|value get)
... add <uuid> <name> <value> (add|multiply|multiply_base)
... remove <uuid>
... value get <uuid> [<scale>]
参数
<target>
应用属性的实体。只接受单一目标。
<attribute>
指定属性的命名空间ID
<scale>
在返回值之前与该值相乘的数字。
<uuid>
字符串格式指定修饰符UUID。具有相同UUID的修饰符不堆叠。
attribute <target> <attribute> (get|base|modifier)
... get [<scale>]
返回指定属性的总值。
... base get [<scale>]
返回指定属性的基值。
... base set <value>
用给定值覆盖指定属性的基值。
... modifier (add|remove|value get)
... add <uuid> <name> <value> (add|multiply|multiply_base)
如果已不存在具有相同UUID的修饰符,则添加具有指定属性的属性修饰符。
... remove <uuid>
删除具有指定UUID的属性修饰符。
... value get <uuid> [<scale>]
返回具有指定UUID的修饰符的值。

历史

Java版(即将到来)
1.1620w17a加入了/attribute