本帖最后由 chyx 于 2015-5-19 01:40 编辑 此贴只是讲解 算法是赶出来的 有许多地方可以改进


首先 这里是切换两个fillclock的地方
下面是标配的复制代码*2
左侧是指示灯
复制代码*2
上面是支持展示框用的复制代码*2
右侧是fill复制代码


这里是面板
复制代码按钮的指令 负责加减时间间隔
显示器的指令:
复制代码按两个按钮都会激活它

fillclock#1

先检测框内物品(做的时候安不上Map It)
复制代码检测是否右键
复制代码
然后是拓展,显示部分 最后讲

fillclock#2
先摆正所有的框
复制代码然后是可控制频率时钟复制代码不要问我为何写的这么恶心 问mojang 因为计分板的一个bug才不得已这么写的

低频时钟
正片开始
先置零
复制代码8*复制代码
游戏规则:
复制代码tur表示要变化
然后又是拓展,显示部分 clone过来

拓展,显示部分
切换黑白状态
b=(b-1)^2 很科学
复制代码复制代码
最后修改显示
复制代码复制代码

新版本已做好http://pan.baidu.com/s/1c0yGwNI*将羊毛和煤块换成地图*增加装饰性屏风 一面是滑翔机图案 一面是cbl logo
来自群组: Command Block Logic


首先 这里是切换两个fillclock的地方
下面是标配的
- summon FallingSand ~ ~.5 ~ {Block:redstone_block}
左侧是指示灯
- /replaceitem entity @e[name=Timer] slot.armor.head minecraft:wool 1 5
上面是支持展示框用的
- execute @e[name=Use] ~ ~ ~ /fill ~ ~ ~ ~ ~ ~-1 minecraft:piston_extension
右侧是fill
- /fill 108 19 -574 108 19 -518 minecraft:redstone_block 0 destroy


这里是面板
- /scoreboard players remove Timer timemax 1
- /scoreboard players add Timer timemax 1
显示器的指令:
- /blockdata 105 16 -570 {Text1:"时间间隔",Text2:"["",{"score":{"name":"Timer","objective":"timemax"},"color":"white","bold":"true"}]"}

fillclock#1

先检测框内物品(做的时候安不上Map It)
- /scoreboard players set @e[name=Use] b 0
- /scoreboard players set @e[name=Use] b 1 {Item:{id:"minecraft:coal_block"}}
- /scoreboard players set @e[name=Use] tur 1
- /scoreboard players set @e[name=Use] tur 0 {ItemRotation:0b}
然后是拓展,显示部分 最后讲

fillclock#2
先摆正所有的框
- entitydata @e[name=Use] {ItemRotation:0b,Invulnerable:1b}
- /scoreboard players operation @e[name=Timer] time = Timer time
- /execute @e[name=Timer,score_time=0] ~ ~ ~ /fill 110 19 -569 110 19 -500 minecraft:redstone_block 0 destroy
- /execute @e[name=Timer,score_time=0] ~ ~ ~ /scoreboard players operation Timer time = Timer timemax
- /scoreboard players remove Timer time 1

低频时钟
正片开始
先置零
- /scoreboard players set @e[name=Use] near 0
- /execute @e[score_b=0] ~ ~1 ~ /scoreboard players add @e[r=0,c=1,name=Use] near 1
游戏规则:
- /scoreboard players set @e[name=Use] tur 0
- /scoreboard players set @e[name=Use,score_b_min=1,score_near_min=3,score_near=3] tur 1
- /scoreboard players set @e[name=Use,score_b=0,score_near_min=0,score_near=1] tur 1
然后又是拓展,显示部分 clone过来

拓展,显示部分
隐藏内容重复8次 对应各个方向
切换黑白状态
b=(b-1)^2 很科学
- /scoreboard players remove @e[score_tur_min=1,name=Use] b 1
- execute @e[score_tur_min=1] ~ ~ ~ /scoreboard players operation @e[c=1,r=0,name=Use] b *= @e[c=1,r=0,name=Use] b
最后修改显示
- entitydata @e[score_b_min=1] {ItemRotation:0b,Invulnerable:1b,Item:{id:"minecraft:coal_block",Count:1b,Damage:0s}}
- entitydata @e[score_b=0] {ItemRotation:0b,Invulnerable:1b,Item:{id:"minecraft:wool",Count:1b,Damage:0s}}

新版本已做好http://pan.baidu.com/s/1c0yGwNI*将羊毛和煤块换成地图*增加装饰性屏风 一面是滑翔机图案 一面是cbl logo
来自群组: Command Block Logic
我说,能不能合到一页上


233333什么鬼