当前位置: 我的世界 > 游戏攻略 > 正文

大神教你制作僵尸出生动画并且可以破坏方块

小编:铅笔时间:2017-10-22 12:56回到游戏园首页

  下面小编为大家带来我的世界僵尸畜生动画教程,并且让僵尸可以破坏方块,想知道如何实现吗?一起来看看吧!

  整体思路: 先说僵尸生成动画,其实这就是将新生成的僵尸传送到地表下,为了防止僵尸窒息这里我在僵尸地表下位置的方块处替换为了空气。当玩家附近存在在地表下的僵尸时,便使僵尸上升直到其处在地表上。

  僵尸破坏方块就比较简单了,只需要一个计时和纵向的检测即可。为了降低难度,如果僵尸在破坏方块(计时增长)的过程中受到伤害,则该僵尸需重新破坏方块(计时)。

  顺带一提,如果要使僵尸可以更加灵活,可以使其可以搭建方块以触及在上方的玩家。只需要延迟定时执行:如果玩家下方有僵尸,便将僵尸升高一定距离时在僵尸处放置一个方块。具体代码见链接

  僵尸出生动画:创建变量:

  /scoreboard objectives add ZombieBorn dummy

  高频部分:

  /scoreboard players add @e[type=Zombie] ZombieBorn 0

  /entitydata @e[type=Zombie,score_ZombieBorn_min=0,score_ZombieBorn=0] {NoAI:1,Silent:1,Invulnerable:1}

  /tp @e[type=Zombie,score_ZombieBorn_min=0,score_ZombieBorn=0] ~ ~-3 ~

  /execute @e[type=Zombie,score_ZombieBorn_min=0,score_ZombieBorn=0] ~ ~ ~ ~ ~1 ~ air 0 replace

  /scoreboard players set @e[type=Zombie,score_ZombieBorn_min=0,score_ZombieBorn=0] ZombieBorn 1

  /execute @a[m=0] ~ ~ ~ scoreboard players set @e[type=Zombie,score_ZombieBorn_min=1,score_ZombieBorn=1,r=7] ZombieBorn 2

  /tp @e[type=Zombie,score_ZombieBorn_min=2,score_ZombieBorn=2] ~ ~0.4 ~

  /entitydata @e[type=Zombie,score_ZombieBorn_min=-1,score_ZombieBorn=-1] {NoAI:0,Silent:0,Invulnerable:0}

  /execute @e[type=Zombie,score_ZombieBorn_min=2,score_ZombieBorn=2] ~ ~ ~ /particle blockcrack ~ ~.5 ~ 0.3 0.2 0.3 0 4 normal @a 2

  /execute @e[type=Zombie,score_ZombieBorn_min=2,score_ZombieBorn=2] ~ ~ ~ detect ~ ~ ~ minecraft:air 0 /scoreboard players set @e[type=Zombie,r=0,c=1] ZombieBorn -1

  僵尸破坏方块:创建变量:

  /scoreboard objectives add BrokeTimer dummy

  /scoreboard objectives add ZHurt dummy

  基础高频:

  /execute @a ~ ~ ~ scoreboard players add @e[type=Zombie,r=8] ZHurt 1 {HurtTime:10s}

  /scoreboard players reset @e[type=Zombie,score_ZHurt_min=1] BrokeTimer

  /scoreboard players set @e[type=Zombie,score_ZHurt_min=1] ZHurt 0

  /execute @a[m=0] ~ ~ ~ scoreboard players add @e[type=Zombie,r=10] BrokeTimer 1

  /scoreboard players set @e[type=Zombie,score_BrokeTimer_min=201] BrokeTimer 50

  脚下方块破坏:

  /execute @a[m=0] ~ ~2 ~ execute @e[type=Zombie,score_BrokeTimer_min=200,r=1] ~ ~ ~ setblock ~ ~-1 ~ air 0 destory

  /execute @a[m=0] ~ ~3 ~ execute @e[type=Zombie,score_BrokeTimer_min=200,r=1] ~ ~ ~ setblock ~ ~-1 ~ air 0 destory

  /execute @a[m=0] ~ ~4 ~ execute @e[type=Zombie,score_BrokeTimer_min=200,r=1] ~ ~ ~ setblock ~ ~-1 ~ air 0 destory

  四周方块破坏:

  /execute @e[score_BrokeTimer_min=200,type=Zombie] ~ ~ ~ fill ~-0.25 ~ ~-0.25 ~0.25 ~2 ~0.25 air 0 destroy

分享到:更多

游戏信息

我的世界
我的世界类型:休闲娱乐平台:PC,iOS,安卓电脑版下载
  • 游戏大礼包
  • 手游开测表