本帖最后由 贰逼 于 2018-8-3 11:05 编辑

首先注明为指令方块作品,1.8能达到自定义3D效果,本篇能达到立体掉落物而不是旋转的贴图掉落物。

效果:方块:

一块普通的石头

扔出去

掉落在地上的物品不是旋转的、有阴影的贴图制物品,而是一个不会懂没阴影的立体小方块

移动到物品上同样能捡起

物品:

一块普通的钻石

扔出去

丢出去直接坠地,不是浮空状,符合物理

走上去同样捡起物品

原理:

全部原理
坠地物品模板:
利用盔甲架实现3D方块,由于智能手持物品,所以只能用到以下方式
物品:

  1. /summon ArmorStand ~ ~0.7 ~ {Equipment:[{id:"minecraft:物品名"},{},{},{},{}],Pose:{Body:[0.0F,0.0F,0.0F],LeftArm:[0.0F,0.0F,0.0F],RightArm:[0.0F,0.0F,0.0F],LeftLeg:[270.0F,0.0F,0.0F],RightLeg:[270.0F,0.0F,0.0F],Head:[0.0F,0.0F,0.0F]},NoGravity:1b,NoBasePlate:1b,Invisible:1b,DisabledSlots:2069869,ShowArms:0b,Small:0b}
复制代码
用于1.12:
  1. /summon minecraft:armor_stand ~ ~0.7 ~ {HandItems:[{id:"minecraft:方块名",Count:1b}],Pose:{Body:[0.0F,0.0F,0.0F],LeftArm:[0.0F,0.0F,0.0F],RightArm:[0.0F,0.0F,0.0F],LeftLeg:[270.0F,0.0F,0.0F],RightLeg:[270.0F,0.0F,0.0F],Head:[0.0F,0.0F,0.0F]},NoGravity:1b,NoBasePlate:1b,Invisible:1b,DisabledSlots:2069869,ShowArms:0b,Small:0b}
复制代码

方块

  1. /summon ArmorStand ~ ~0.85 ~ {Equipment:[{id:"minecraft:方块名"},{},{},{},{}],Pose:{Body:[0.0F,0.0F,0.0F],LeftArm:[0.0F,0.0F,0.0F],RightArm:[346.0F,0.0F,0.0F],LeftLeg:[270.0F,0.0F,0.0F],RightLeg:[270.0F,0.0F,0.0F],Head:[0.0F,0.0F,0.0F]},NoGravity:1b,NoBasePlate:1b,Invisible:1b,DisabledSlots:2069869,ShowArms:0b,Small:0b}
复制代码
用于1.12:
  1. /summon minecraft:armor_stand ~ ~0.85 ~ {HandItems:[{id:"minecraft:方块名",Count:1b}],Pose:{Body:[0.0F,0.0F,0.0F],LeftArm:[0.0F,0.0F,0.0F],RightArm:[346.0F,0.0F,0.0F],LeftLeg:[270.0F,0.0F,0.0F],RightLeg:[270.0F,0.0F,0.0F],Head:[0.0F,0.0F,0.0F]},NoGravity:1b,NoBasePlate:1b,Invisible:1b,DisabledSlots:2069869,ShowArms:0b,Small:0b}
复制代码

对固定选择器执行:
物品:

  1. /execute @p ~0.3 ~ ~-0.4 summon ArmorStand ~ ~-0.75 ~ {Equipment:[{id:"minecraft:物品名"},{},{},{},{}],Pose:{Body:[0.0F,0.0F,0.0F],LeftArm:[0.0F,0.0F,0.0F],RightArm:[0.0F,0.0F,0.0F],LeftLeg:[270.0F,0.0F,0.0F],RightLeg:[270.0F,0.0F,0.0F],Head:[0.0F,0.0F,0.0F]},NoGravity:1b,NoBasePlate:1b,Invisible:1b,DisabledSlots:2069869,ShowArms:0b,Small:0b}
复制代码
用于1.12:
  1. /execute @p ~0.3 ~ ~-0.4 summon minecraft:armor_stand ~ ~-0.75 ~ {HandItems:[{id:"minecraft:物品名",Count:1b}],Pose:{Body:[0.0F,0.0F,0.0F],LeftArm:[0.0F,0.0F,0.0F],RightArm:[0.0F,0.0F,0.0F],LeftLeg:[270.0F,0.0F,0.0F],RightLeg:[270.0F,0.0F,0.0F],Head:[0.0F,0.0F,0.0F]},NoGravity:1b,NoBasePlate:1b,Invisible:1b,DisabledSlots:2069869,ShowArms:0b,Small:0b}
复制代码

方块:

  1. /execute @p ~0.3 ~ ~-0.4 summon ArmorStand ~ ~-0.6 ~ {Equipment:[{id:"minecraft:方块名"},{},{},{},{}],Pose:{Body:[0.0F,0.0F,0.0F],LeftArm:[0.0F,0.0F,0.0F],RightArm:[346.0F,0.0F,0.0F],LeftLeg:[270.0F,0.0F,0.0F],RightLeg:[270.0F,0.0F,0.0F],Head:[0.0F,0.0F,0.0F]},NoGravity:1b,NoBasePlate:1b,Invisible:1b,DisabledSlots:2069869,ShowArms:0b,Small:0b}
复制代码
  1. /execute @p ~0.3 ~ ~-0.4 summon minecraft:armor_stand ~ ~-0.6 ~ {HandItems:[{id:"minecraft:方块名",Count:1b}],Pose:{Body:[0.0F,0.0F,0.0F],LeftArm:[0.0F,0.0F,0.0F],RightArm:[346.0F,0.0F,0.0F],LeftLeg:[270.0F,0.0F,0.0F],RightLeg:[270.0F,0.0F,0.0F],Head:[0.0F,0.0F,0.0F]},NoGravity:1b,NoBasePlate:1b,Invisible:1b,DisabledSlots:2069869,ShowArms:0b,Small:0b}
复制代码


注:1.12主要改动是
  1. ArmorStand => minecraft:armor_stand
  2. Equipment:[{id:"minecraft:X"},{},{},{},{}] => HandItems:[{id:"minecraft:X",Count:1b}]
复制代码

主原理区。

首先需要计分板探测物品:
  1. /scoreboard objectives add item dummy
复制代码
添加物品判据

单个主原理区首先需要一个指令方块高频
生成区:
红色:
  1. /scoreboard players set @e[type=Item] item n {Item:{id:"minecraft:掉落物名"},OnGround:1b}
复制代码
为物品设置盘踞方便执行命令

红色利用比较器输出黄色:
因为充能信号,所以先执行:
  1. /execute @e[type=Item,score_item_min=n,score_item=n] ~模板x值 ~<span style="line-height: 1.5;">模板y值</span><span style="line-height: 1.5;"> ~</span><span style="line-height: 1.5;">模板z值</span><span style="line-height: 1.5;"> summon ArmorStand ~ ~ ~ {Equipment:[{id:"minecraft:掉落物名"},{},{},{},{}],Pose:{Body:[0.0F,0.0F,0.0F],LeftArm:[0.0F,0.0F,0.0F],RightArm:[346.0F,0.0F,0.0F],LeftLeg:[270.0F,0.0F,0.0F],RightLeg:[270.0F,0.0F,0.0F],Head:[0.0F,0.0F,0.0F]},NoGravity:1b,NoBasePlate:1b,Invisible:1b,DisabledSlots:2069869,ShowArms:0b,Small:0b,CustomName:"掉落物名"}</span>
复制代码
然后执行:
  1. /tp @e[type=Item,score_item_min=n,score_item=n] 指定坐标
复制代码
用于暂存物品

回收区:
由于红是信号大小差异,先执行信号大的:
绿色:
  1. /execute @e[name=stone,type=ArmorStand] ~-模板x值 ~-模板y值 ~-模板z值 execute @a[r=1] ~ ~ ~ tp @e[type=Item,score_item_min=n,score_item=n] @p
复制代码
当玩家达到与3D物品重合,将原来物品tp给玩家

橙色:
  1. /execute @e[name=掉落物名,type=ArmorStand] ~-模板x值 ~-模板y值 ~-模板z值 execute @a[r=1] ~ ~ ~ kill @e[type=ArmorStand,name=掉落物名,r=2]
复制代码
并且将3D物品删掉

存档将会在下次教程放出。[groupid=546]Command Block Logic[/groupid]