本帖最后由 guaiwanji 于 2015-5-10 10:38 编辑
哈喽,今天我无聊时弄了一个东东,我把execute和entitydata结合了起来,弄了这样一个指令:
- /execute @e[type=Creeper] ~ ~-1 ~ detect ~ ~ ~ bedrock 0 /entitydata @e[type=Creeper] {Motion:[0.0,0.5,0.0]}
复制代码
然后,连上高频,我就发现,踩在基岩上的爬行者,就会不断地跳动:
所以我就大受启发,用那个存档做了个地图,命令方块如下:
对,只有几个命令方块,我们来演示一下这个地图:
http://v.youku.com/v_show/id_XODk1MTA3OTQ0.html?f=23490225&from=y1.7-1.3(由于视频君已牺牲,所以直接上视频网址)
接下来是原理:
我们看到,苦力怕踩到不同的方块就有不同的效果,非常明显是用/execute做的,那我们来看一看指令:
绿宝石块
作用:使苦力怕前进,速度中等 指令(P.S这里的所有指令都要连高频):
- execute @e[type=Creeper] ~ ~-1 ~ detect ~ ~ ~ emerald_block 0 entitydata @e[type=Creeper,r=1]
复制代码
{Motion:[0.0,0.0,0.1]} 这条指令使用了detect来检测creeper脚下踩的是不是绿宝石块,如果是,则让苦力怕Z坐标以0.1的速度前进。(这要看实际情况应用时有可能X坐标前进、Z坐标后退等) |
粘性活塞
作用:使苦力怕跳跃的同时前进,速度较快,指令:- execute @e[type=Creeper] ~ ~-1 ~ detect ~ ~ ~ sticky_piston 1 entitydata @e[type=Creeper,r=1] {direction:[0.0,0.0,0.0],Motion:[0.0,0.5,0.5]}
复制代码 检测苦力怕脚下踩的是不是粘性活塞,是则Y、Z坐标以0.5的速度前进,如果这个指令不加execute直接连高频,那么苦力怕会飞起来 。
:终于逆袭了么?
|
石头
:
使苦力怕前进,还可以让苦力怕攀岩,指令:
前进:跟绿宝石一样,不过把emerald_block换成stone。
攀岩:- execute @e[type=Creeper] ~ ~ ~1 detect ~ ~ ~ stone 0 entitydata @e[type=Creeper,r=1] {direction:[0.0,0.0,0.0],Motion:[0.0,0.1,0.1]}
复制代码 检测苦力怕的Z坐标加一格的位置有没有石头,有则Y坐标Z坐标加1。
|
黄金/钻石块
(图太难截了,去视频里看吧。)作用:黄金块能让苦力怕瞬间传送到下面五格,钻石块能让苦力怕瞬间传送到上面五格。指令:
黄金:- execute @e[type=Creeper] ~ ~-1 ~ detect ~ ~ ~ gold_block 0 tp @e[type=Creeper,r=1] ~ ~5 ~
复制代码 钻石:- execute @e[type=Creeper] ~ ~-1 ~ detect ~ ~ ~ diamond_block 0 tp @e[type=Creeper,r=1] ~ ~-5 ~
复制代码 原理简单,下面的指令不讲解了了。
|
玻璃
作用:让苦力怕跳得很高,但会让苦力怕后退,指令:
- execute @e[type=Creeper] ~ ~-1 ~ detect ~ ~ ~ glass 0 entitydata @e[type=Creeper,r=1] {direction:[0.0,0.0,0.0],Motion:[0.0,1.0,-0.2]}
复制代码
|
栅栏
(图太难截了,去视频里看吧)作用:让苦力怕跑得飞快!还伴有跳跃效果,指令:
- execute @e[type=Creeper] ~ ~-1 ~ detect ~ ~ ~ fence 0 entitydata @e[type=Creeper,r=1] {Motion:[0.0,0.1,1.0]}
复制代码
|
砖块
作用:让苦力怕前进,速度中等,方向与绿宝石块相反,指令:
- execute @e[type=Creeper] ~ ~-1 ~ detect ~ ~ ~ fence 0 entitydata @e[type=Creeper,r=1] {Motion:[0.0,0.1,1.0]}
复制代码
|
活塞
(懒得截图了)作用:让苦力怕跳跃并前进,方向跟粘性活塞相反。(指令只要把Motion的Z坐标加个负号再把sticky_piston换成piston就可以了 |
红色粘土
作用:杀掉苦力怕,指令:
- execute @e[type=Creeper] ~ ~-1 ~ detect ~ ~ ~ stained_hardened_clay 14 kill @e[type=Creeper,r=1]
复制代码
|
由于时间关系,我只弄了这几个方块,如果你们有兴趣的话,可以把这张地图下载下来,再改进一下。
下载地址:我希望你们在下载之前能理解我发表这张帖子的用意,我想让大家明白,命令方块的应用不只是死记硬背那一个个指令,而是要想办法把这个指令用的最好,大家要敢于想别人没想到的,发挥出自己的创意,不断创新,才能让命令方块发挥最大的用处。好了,如果你看完了这段fei hua,就点击下载吧。 |
END