首先注明为指令方块作品,1.8能达到自定义3D效果,本篇能达到立体掉落物而不是旋转的贴图掉落物。
效果:方块:
一块普通的石头
扔出去
掉落在地上的物品不是旋转的、有阴影的贴图制物品,而是一个不会懂没阴影的立体小方块
移动到物品上同样能捡起
物品:
一块普通的钻石
扔出去
丢出去直接坠地,不是浮空状,符合物理
走上去同样捡起物品
原理:
全部原理
坠地物品模板:
利用盔甲架实现3D方块,由于智能手持物品,所以只能用到以下方式
物品:
- /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}
- /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}
方块
- /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}
- /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}
对固定选择器执行:
物品:
- /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}
- /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}
方块:
- /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}
- /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主要改动是
- ArmorStand => minecraft:armor_stand
- Equipment:[{id:"minecraft:X"},{},{},{},{}] => HandItems:[{id:"minecraft:X",Count:1b}]
主原理区。
首先需要计分板探测物品:
- /scoreboard objectives add item dummy
单个主原理区首先需要一个指令方块高频
生成区:
红色:
- /scoreboard players set @e[type=Item] item n {Item:{id:"minecraft:掉落物名"},OnGround:1b}
红色利用比较器输出黄色:
因为充能信号,所以先执行:
- /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>
- /tp @e[type=Item,score_item_min=n,score_item=n] 指定坐标
回收区:
由于红是信号大小差异,先执行信号大的:
绿色:
- /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
橙色:
- /execute @e[name=掉落物名,type=ArmorStand] ~-模板x值 ~-模板y值 ~-模板z值 execute @a[r=1] ~ ~ ~ kill @e[type=ArmorStand,name=掉落物名,r=2]
存档将会在下次教程放出。[groupid=546]Command Block Logic[/groupid]