有毒○贰比
怎么检测发射器里面有指定的物品

然后删除

再填充一个

说白点就是自定义合成



chyx
搜索功能啊:::http://www.mcbbs.net/forum.php?m ... eid%26typeid%3D1293

有毒○贰比
chyx 发表于 2017-11-11 21:49
搜索功能啊:::http://www.mcbbs.net/forum.php?mod=viewthread&tid=643866&extra=page%3D2%26filter%3Dt ...

那怎么检测有属性比如附魔有名字的物品呢

pineapple_
我的夜色 发表于 2017-11-11 21:54
那怎么检测有属性比如附魔有名字的物品呢

testforblock就太麻烦了
你需要testforblocks,
先在一个发射器里摆好一个你想要的合成表
然后在另一个位置放一个方向相同激活状态相同的发射器(也就是两个发射器是否被激活都要相同)
testforblocks 先摆的那个发射器的坐标 先摆的那个发射器的坐标 后摆的那个发射器的坐标,成功对比后输出replaceitem或blockdata

pineapple_
我的夜色 发表于 2017-11-11 21:54
那怎么检测有属性比如附魔有名字的物品呢

如果非要比较属性和名字,那我就给个例子吧
/testforblock xyz 方块 数据值 {Items:[{Slot:0b,id:"minecraft:stone",Count:1b,tag:{AttributeModifiers:[{Operation:0,UUIDLeast:1l,UUIDMost:1l,Amount:10.0d,Nane:"1",AttributeName:"genric.attackDamage",Slot:"head"}],display:{Name:"xxx"}}}]}

有毒○贰比
pineapple_ 发表于 2017-11-11 22:13
testforblock就太麻烦了
你需要testforblocks,
先在一个发射器里摆好一个你想要的合成表
testforblocks 先摆的那个发射器的坐标 先摆的那个发射器的坐标 后摆的那个发射器的坐标,成功对比后输出replaceitem或blockdata
听不懂

有毒○贰比
pineapple_ 发表于 2017-11-11 22:17
如果非要比较属性和名字,那我就给个例子吧
/testforblock xyz 方块 数据值 {Items:[{Slot:0b,id:"minecr ...

/testforblock xyz dropper 0 {Items:[{Slot:0b,id:"minecraft:stone",Count:1b,tag:{AttributeModifiers:[{Operation:0,UUIDLeast:1l,UUIDMost:1l,Amount:10.0d,Nane:"1",AttributeName:"genric.attackDamage",Slot:"head"}],display:{Name:"检测物品名"}}}]}   
,Slot:"head"}]
     是什么意思            

⊙v⊙
我的夜色 发表于 2017-11-11 13:08
/testforblock xyz dropper 0 {Items:[{Slot:0b,id:"minecraft:stone",Count:1b,tag:{AttributeModifiers ...

就是这个物品装备在头部槽位的时候才给玩家buff...

有毒○贰比
pineapple_ 发表于 2017-11-11 22:17
如果非要比较属性和名字,那我就给个例子吧
/testforblock xyz 方块 数据值 {Items:[{Slot:0b,id:"minecr ...

那怎么就单单检测名字捏?

⊙v⊙
参照菠萝人的例子
里面的tag:{........}这一段
删剩tag:{display:{Name:"xxx"}}

有毒○贰比
⊙v⊙ 发表于 2017-11-12 08:33
参照菠萝人的例子
里面的tag:{........}这一段
删剩tag:{display:{Name:"xxx"}}

/testforblock xyz dropper 0 {Items:[{Slot:0b,id:"minecraft:stone",Count:1b,tag:{display:{Name:"检测物品名"}}

这样?