最新的游戏资讯
精彩的游戏攻略

《我的世界》租赁服自动砍树命令教程_命令方块介绍

《我的世界》租赁服自动砍树命令教程_命令方块介绍

  • 相关软件

    世界

    大小:33.1M 语言:简体中文

    类型:游戏推荐 等级:

    立即下载 查看详情

      《我的世界》中租赁服能不能自动砍树?命令指令是什么?很多玩家都还不知道。接下来就为大家带来玩家“翔翼之刃”提供的租赁服自动砍树命令教程,感兴趣的玩家一起来看看吧。

      教程:​

      理论适用版本:1.9-1.12.2

      一键命令方块适用版本:1.11.2-1.12.2

      对于1.9-1.10.2的版本,若使用砍树叶版本,需要将命令中的area_effect_cloud 全部替换为AreaEffectCloud。

      功能:类似于砍树插件,当玩家使用钻石斧时,自动将整棵树的原木和树叶全部砍下。(砍下树叶为可选,详见一键命令方块部分)

      (注:也可以使用其他种类或者带特殊NBT标签的斧头作为判据,但需要对命令进行相应的增加和修改)

      使用效果(以丛林木为例):

       

       

       

      大致原理:

      检测玩家在使用钻石斧时其周围是否有被砍下的原木(掉落物)

      对于原木方块:用原木掉落物直接对周围方块进行探测并破坏符合条件的方块。

      对于树叶:以带tag的药水云(area_effect_cloud)作为标记不断向周围遍历是否有树叶,

      满足条件则在对应位置添加相同标记,并破坏标记位置的方块。

      为避免卡顿,旧的标记会被及时清除。

      如此反复循环,直到所有的原木和树叶全部被破坏。

      优点:

      1、使服务器玩家在游戏后期无需再进行繁琐的砍树操作。

      2、适用于所有种类的树木。

      存在问题:

      1、可能会破坏游戏平衡性……

      2、砍伐大型树木时可能会造成短暂卡顿(如底盘为2×2且高度比较高的深色橡木和丛林木)

      3、对村庄的房子和农田中的原木使用钻石斧有奇效……

      已知bug:当选用砍树叶版时,邻近树木的树叶也会被影响。

    命令部分

      注:

      1:开头带COND的为条件制约的连锁命令方块,带R的为循环命令方块,其余为不受制约的连锁命令方块。

      2:@TAG-1代表标记为TAG#1的循环命令方块的相对坐标。如果是手动设置命令方块的话,一定要将@TAG-1更改为正确的相对坐标。

      3:这里只展示了砍树叶版本的命令,如果需要使用不砍树叶版本,只要将带有area_effect_cloud的所有命令整条删除即可。

      初始化命令:

      /scoreboard objectives add useaxe stat.useItem.minecraft.diamond_axe

      /scoreboard objectives add check dummy

      命令方块部分:

      R:execute @a[score_useaxe_min=1] ~ ~ ~ scoreboard players tag @e[type=item,r=5] add tree {Item:{id:"minecraft:log"}}

      COND:blockdata @TAG-1 {auto:1b}

      execute @a[score_useaxe_min=1] ~ ~ ~ scoreboard players tag @e[type=item,r=5] add tree {Item:{id:"minecraft:log2"}}

      COND:blockdata @TAG-1 {auto:1b}

      scoreboard players set @a[score_useaxe_min=1] useaxe 0

      TAG#1:R:execute @e[tag=treeold] ~ ~ ~ scoreboard players tag @e[type=item,tag=!treeold] add tree {Item:{id:"minecraft:log"}}

      execute @e[tag=treeold] ~ ~ ~ scoreboard players tag @e[type=item,tag=!treeold] add tree {Item:{id:"minecraft:log2"}}

      execute @e[tag=treeold] ~ ~1 ~ detect ~ ~ ~ minecraft:leaves -1 summon minecraft:area_effect_cloud ~ ~ ~ {NoGravity:1b,Duration:9999999,Tags:[0:"treeold",1:"tree"]}

      execute @e[tag=tree,type=area_effect_cloud] ~ ~ ~ setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=treeold] ~1 ~ ~ detect ~ ~ ~ minecraft:leaves -1 summon minecraft:area_effect_cloud ~ ~ ~ {NoGravity:1b,Duration:9999999,Tags:[0:"treeold",1:"tree"]}

      execute @e[tag=tree,type=area_effect_cloud] ~ ~ ~ setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=treeold] ~ ~ ~1 detect ~ ~ ~ minecraft:leaves -1 summon minecraft:area_effect_cloud ~ ~ ~ {NoGravity:1b,Duration:9999999,Tags:[0:"treeold",1:"tree"]}

      execute @e[tag=tree,type=area_effect_cloud] ~ ~ ~ setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=treeold] ~-1 ~ ~ detect ~ ~ ~ minecraft:leaves -1 summon minecraft:area_effect_cloud ~ ~ ~ {NoGravity:1b,Duration:9999999,Tags:[0:"treeold",1:"tree"]}

      execute @e[tag=tree,type=area_effect_cloud] ~ ~ ~ setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=treeold] ~ ~ ~-1 detect ~ ~ ~ minecraft:leaves -1 summon minecraft:area_effect_cloud ~ ~ ~ {NoGravity:1b,Duration:9999999,Tags:[0:"treeold",1:"tree"]}

      execute @e[tag=tree,type=area_effect_cloud] ~ ~ ~ setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=treeold] ~ ~1 ~ detect ~ ~ ~ minecraft:leaves2 -1 summon minecraft:area_effect_cloud ~ ~ ~ {NoGravity:1b,Duration:9999999,Tags:[0:"treeold",1:"tree"]}

      execute @e[tag=tree,type=area_effect_cloud] ~ ~ ~ setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=treeold] ~1 ~ ~ detect ~ ~ ~ minecraft:leaves2 -1 summon minecraft:area_effect_cloud ~ ~ ~ {NoGravity:1b,Duration:9999999,Tags:[0:"treeold",1:"tree"]}

      execute @e[tag=tree,type=area_effect_cloud] ~ ~ ~ setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=treeold] ~ ~ ~1 detect ~ ~ ~ minecraft:leaves2 -1 summon minecraft:area_effect_cloud ~ ~ ~ {NoGravity:1b,Duration:9999999,Tags:[0:"treeold",1:"tree"]}

      execute @e[tag=tree,type=area_effect_cloud] ~ ~ ~ setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=treeold] ~-1 ~ ~ detect ~ ~ ~ minecraft:leaves2 -1 summon minecraft:area_effect_cloud ~ ~ ~ {NoGravity:1b,Duration:9999999,Tags:[0:"treeold",1:"tree"]}

      execute @e[tag=tree,type=area_effect_cloud] ~ ~ ~ setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=treeold] ~ ~ ~-1 detect ~ ~ ~ minecraft:leaves2 -1 summon minecraft:area_effect_cloud ~ ~ ~ {NoGravity:1b,Duration:9999999,Tags:[0:"treeold",1:"tree"]}

      execute @e[tag=tree,type=area_effect_cloud] ~ ~ ~ setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=tree,type=item] ~ ~1 ~ detect ~ ~ ~ minecraft:log -1 setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=tree,type=item] ~1 ~1 ~ detect ~ ~ ~ minecraft:log -1 setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=tree,type=item] ~ ~1 ~1 detect ~ ~ ~ minecraft:log -1 setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=tree,type=item] ~-1 ~1 ~ detect ~ ~ ~ minecraft:log -1 setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=tree,type=item] ~ ~1 ~-1 detect ~ ~ ~ minecraft:log -1 setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=tree,type=item] ~1 ~1 ~-1 detect ~ ~ ~ minecraft:log -1 setblock ~ ~ ~ minecraft:air 0 destroy

      execute @e[tag=tree,type=it

    • 1
      2
      3
      4
      5

  • 赞(0)

    评论 抢沙发

    • 昵称 (必填)
    • 邮箱 (必填)
    • 网址

    饭游网