songfeitong
仅是求帮写一段命令。
假设现在我有一个物品(假设为石头),自定义名称为x.
那么现在我把它扔在地上,它变为一个实体。
众所周知:
The commands /testfor, /testforblock and /clear can now test for partial matches of NBT lists
/testfor、/testforblock和/clear现在可以测试部分NBT匹配了)
Example: /testfor @p {Inventory:[{Slot:6b,id:"minecraft:diamond_sword"}],SelectedItemSlot:6}
例子:/testfor @p {Inventory:[{Slot:6b,id:"minecraft:diamond_sword"}],SelectedItemSlot:6

(翻译By Cyq)

所以现在求一段/testfor命令可以检测这个掉落物品。最主要是Nbt部分。

之后的内容我自己也可以类比得到。


@cyqsimon @PotatoMaster101 @tyson @贰逼 @审奥不解释

快来!



tyson
表nbt渣渣

cyqsimon
给我五分钟

cyqsimon
本帖最后由 cyqsimon 于 2014-2-22 22:15 编辑
  1. /testfor @e[type=Item] {Item:{id:minecraft:stone,tag:{display:{Name:x}}}}
复制代码
就是这样

话说感谢信任~

cyqsimon
哦不不不

忘了...

x旁边要加上双引号

所以应该是这样
  1. /testfor @e[type=Item] {Item:{id:minecraft:stone,tag:{display:{Name:"x"}}}}
复制代码

songfeitong
cyqsimon 发表于 2014-2-22 22:18
哦不不不

忘了...

貌似不加也能用。
话说数据值在哪加?

cyqsimon
songfeitong 发表于 2014-2-22 22:21
貌似不加也能用。
话说数据值在哪加?

具体是什么数据值?

songfeitong
cyqsimon 发表于 2014-2-22 22:27
具体是什么数据值?

比如如果我要检测花岗岩数据值就为1。

第一页 上一页 下一页 最后一页