本帖最后由 TheSuncommand 于 2020-8-29 09:07 编辑 
不能说是完全没意义,这种系统也就三个命令方块
但还是不能比得过随便把一个文件丢到plugins/
里面就可以用了的,主要是在做的地图需要用到
地图不能用插件,所以自然的要用命令方块来做系统
好了,不说废话了,直接冲教程
 
 
这个命令组的缺点是箱子将会占用两格的空间有时可能会把箱子锁了然后没法复原(没遇到过,但有点确定)
上面一格的红石火把是用来检测箱子关闭的,且箱子必须
为陷阱箱,不然无法触发红石火把
除非是完全不能使用插件的地图或存档
不然别制作这个全是特性(BUG)的命令方块组(也就三个命令方块的事情)
下面是我测试用的砬(实例)
请自行在箱子处召唤对于的AEC,这里不提供放置方块在方块放置处执行指令的教程
出于对于砬的绝对不严谨性,请自行制作系统!
不能说是完全没意义,这种系统也就三个命令方块
但还是不能比得过随便把一个文件丢到plugins/
里面就可以用了的,主要是在做的地图需要用到
地图不能用插件,所以自然的要用命令方块来做系统
好了,不说废话了,直接冲教程

这个命令组的缺点是箱子将会占用两格的空间有时可能会把箱子锁了然后没法复原(没遇到过,但有点确定)
上面一格的红石火把是用来检测箱子关闭的,且箱子必须
为陷阱箱,不然无法触发红石火把
除非是完全不能使用插件的地图或存档
不然别制作这个全是特性(BUG)的命令方块组(也就三个命令方块的事情)
下面是我测试用的砬(实例)
请自行在箱子处召唤对于的AEC,这里不提供放置方块在方块放置处执行指令的教程
出于对于砬的绝对不严谨性,请自行制作系统!
 /summon area_effect_cloud ~ ~ ~ {Tags:["LAEC"],Duration:2147483647}
 /summon area_effect_cloud ~ ~ ~ {Tags:["LAEC"],Duration:2147483647}
 /scoreboard objectives add openchest minecraft.custom:minecraft.open_chest
 /scoreboard objectives add openchest minecraft.custom:minecraft.open_chest
 /setblock ~ ~1 ~ minecraft:redstone_torch#这段站在陷阱箱上输入
 /setblock ~ ~1 ~ minecraft:redstone_torch#这段站在陷阱箱上输入
 /execute as @e[type=minecraft:area_effect_cloud,tag=LAEC] at @s as @a[distance=..7,scores={openchest=1..}] run data merge block ~ ~ ~ {Lock:"ProtectedChest"} #Lock里面用一串别人永远都不能在铁砧里面改名到的字符,推荐用"§"*(他人不知道也算为一种情况,所以乱输也行),这里方便介绍直接用了ProtectedChest
 /execute as @e[type=minecraft:area_effect_cloud,tag=LAEC] at @s as @a[distance=..7,scores={openchest=1..}] run data merge block ~ ~ ~ {Lock:"ProtectedChest"} #Lock里面用一串别人永远都不能在铁砧里面改名到的字符,推荐用"§"*(他人不知道也算为一种情况,所以乱输也行),这里方便介绍直接用了ProtectedChest
 /execute as @e[type=minecraft:area_effect_cloud,tag=LAEC] at @s as @a[distance=..7] if block ~ ~1 ~ minecraft:redstone_torch[lit=true] run data merge block ~ ~ ~ {Lock:""}
 /execute as @e[type=minecraft:area_effect_cloud,tag=LAEC] at @s as @a[distance=..7] if block ~ ~1 ~ minecraft:redstone_torch[lit=true] run data merge block ~ ~ ~ {Lock:""}
 /execute as @a at @s unless entity @s[scores={openchest=1}] run scoreboard players set @s openchest 1
 /execute as @a at @s unless entity @s[scores={openchest=1}] run scoreboard players set @s openchest 1
感谢@大笑的南仁通 提醒,教程里并没有这个东西,最近都没上线很抱歉,现在把这个补上
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s as @e[type=minecraft:hopper_minecart,distance=..3] at @s run tellraw @a[distance=..3] ["\u00a7e[\u00a7bCONSOLE\u00a7e] \u00a7c你不能在被保护的箱子周围放置漏斗矿车!"]
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s as @e[type=minecraft:hopper_minecart,distance=..3] at @s run tellraw @a[distance=..3] ["\u00a7e[\u00a7bCONSOLE\u00a7e] \u00a7c你不能在被保护的箱子周围放置漏斗矿车!"]
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s as @e[type=minecraft:hopper_minecart,distance=..3] at @s run summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:hopper_minecart",Count:1b}}
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s as @e[type=minecraft:hopper_minecart,distance=..3] at @s run summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:hopper_minecart",Count:1b}}
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s as @e[type=minecraft:hopper_minecart,distance=..3] at @s run kill @s
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s as @e[type=minecraft:hopper_minecart,distance=..3] at @s run kill @s
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s if block ~ ~-1 ~ minecraft:hopper run tellraw @a[distance=..3] ["\u00a7e[\u00a7bCONSOLE\u00a7e] \u00a7c你不能在被保护的箱子周围放置漏斗!"]
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s if block ~ ~-1 ~ minecraft:hopper run tellraw @a[distance=..3] ["\u00a7e[\u00a7bCONSOLE\u00a7e] \u00a7c你不能在被保护的箱子周围放置漏斗!"]
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s if block ~ ~-1 ~ minecraft:hopper run setblock ~ ~-1 ~ air destory
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s if block ~ ~-1 ~ minecraft:hopper run setblock ~ ~-1 ~ air destory
| 
 | 
不能说是完全没意义,这种系统也就三个命令方块
但还是不能比得过随便把一个文件丢到plugins/
里面就可以用了的,主要是在做的地图需要用到
地图不能用插件,所以自然的要用命令方块来做系统
好了,不说废话了,直接冲教程
| 
 | 
 
| 
 | 
检测玩家打开箱子 > 将箱子上锁 > 关闭箱子时将其解锁
| 
 | 
这个命令组的缺点是箱子将会占用两格的空间有时可能会把箱子锁了然后没法复原(没遇到过,但有点确定)
上面一格的红石火把是用来检测箱子关闭的,且箱子必须
为陷阱箱,不然无法触发红石火把
| 
 | 
除非是完全不能使用插件的地图或存档
不然别制作这个全是特性
| 
 | 
下面是我测试用的砬(实例)
请自行在箱子处召唤对于的AEC,这里不提供放置方块在方块放置处执行指令的教程
出于对于砬的绝对不严谨性,请自行制作系统!
| 
 | 
2021.12 数据,可能有更多内容
| 
 | 
不能说是完全没意义,这种系统也就三个命令方块
但还是不能比得过随便把一个文件丢到plugins/
里面就可以用了的,主要是在做的地图需要用到
地图不能用插件,所以自然的要用命令方块来做系统
好了,不说废话了,直接冲教程
| 
 | 

| 
 | 
检测玩家打开箱子 > 将箱子上锁 > 关闭箱子时将其解锁
| 
 | 
这个命令组的缺点是箱子将会占用两格的空间有时可能会把箱子锁了然后没法复原(没遇到过,但有点确定)
上面一格的红石火把是用来检测箱子关闭的,且箱子必须
为陷阱箱,不然无法触发红石火把
| 
 | 
除非是完全不能使用插件的地图或存档
不然别制作这个全是特性
| 
 | 
下面是我测试用的砬(实例)
请自行在箱子处召唤对于的AEC,这里不提供放置方块在方块放置处执行指令的教程
出于对于砬的绝对不严谨性,请自行制作系统!
 /summon area_effect_cloud ~ ~ ~ {Tags:["LAEC"],Duration:2147483647}
 /summon area_effect_cloud ~ ~ ~ {Tags:["LAEC"],Duration:2147483647} /scoreboard objectives add openchest minecraft.custom:minecraft.open_chest
 /scoreboard objectives add openchest minecraft.custom:minecraft.open_chest /setblock ~ ~1 ~ minecraft:redstone_torch#这段站在陷阱箱上输入
 /setblock ~ ~1 ~ minecraft:redstone_torch#这段站在陷阱箱上输入 /execute as @e[type=minecraft:area_effect_cloud,tag=LAEC] at @s as @a[distance=..7,scores={openchest=1..}] run data merge block ~ ~ ~ {Lock:"ProtectedChest"} #Lock里面用一串别人永远都不能在铁砧里面改名到的字符,推荐用"§"*(他人不知道也算为一种情况,所以乱输也行),这里方便介绍直接用了ProtectedChest
 /execute as @e[type=minecraft:area_effect_cloud,tag=LAEC] at @s as @a[distance=..7,scores={openchest=1..}] run data merge block ~ ~ ~ {Lock:"ProtectedChest"} #Lock里面用一串别人永远都不能在铁砧里面改名到的字符,推荐用"§"*(他人不知道也算为一种情况,所以乱输也行),这里方便介绍直接用了ProtectedChest /execute as @e[type=minecraft:area_effect_cloud,tag=LAEC] at @s as @a[distance=..7] if block ~ ~1 ~ minecraft:redstone_torch[lit=true] run data merge block ~ ~ ~ {Lock:""}
 /execute as @e[type=minecraft:area_effect_cloud,tag=LAEC] at @s as @a[distance=..7] if block ~ ~1 ~ minecraft:redstone_torch[lit=true] run data merge block ~ ~ ~ {Lock:""} /execute as @a at @s unless entity @s[scores={openchest=1}] run scoreboard players set @s openchest 1
 /execute as @a at @s unless entity @s[scores={openchest=1}] run scoreboard players set @s openchest 1| 
 | 
感谢@大笑的南仁通 提醒,教程里并没有这个东西,最近都没上线很抱歉,现在把这个补上
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s as @e[type=minecraft:hopper_minecart,distance=..3] at @s run tellraw @a[distance=..3] ["\u00a7e[\u00a7bCONSOLE\u00a7e] \u00a7c你不能在被保护的箱子周围放置漏斗矿车!"]
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s as @e[type=minecraft:hopper_minecart,distance=..3] at @s run tellraw @a[distance=..3] ["\u00a7e[\u00a7bCONSOLE\u00a7e] \u00a7c你不能在被保护的箱子周围放置漏斗矿车!"] /execute as @e[type=area_effect_cloud,tag=LAEC] at @s as @e[type=minecraft:hopper_minecart,distance=..3] at @s run summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:hopper_minecart",Count:1b}}
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s as @e[type=minecraft:hopper_minecart,distance=..3] at @s run summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:hopper_minecart",Count:1b}} /execute as @e[type=area_effect_cloud,tag=LAEC] at @s as @e[type=minecraft:hopper_minecart,distance=..3] at @s run kill @s
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s as @e[type=minecraft:hopper_minecart,distance=..3] at @s run kill @s /execute as @e[type=area_effect_cloud,tag=LAEC] at @s if block ~ ~-1 ~ minecraft:hopper run tellraw @a[distance=..3] ["\u00a7e[\u00a7bCONSOLE\u00a7e] \u00a7c你不能在被保护的箱子周围放置漏斗!"]
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s if block ~ ~-1 ~ minecraft:hopper run tellraw @a[distance=..3] ["\u00a7e[\u00a7bCONSOLE\u00a7e] \u00a7c你不能在被保护的箱子周围放置漏斗!"] /execute as @e[type=area_effect_cloud,tag=LAEC] at @s if block ~ ~-1 ~ minecraft:hopper run setblock ~ ~-1 ~ air destory
 /execute as @e[type=area_effect_cloud,tag=LAEC] at @s if block ~ ~-1 ~ minecraft:hopper run setblock ~ ~-1 ~ air destory主要问题不在于能否复原或是否为陷阱箱,而是Lock也就只能在冒险模式里用用
这个好像还行qwq
不能检测方块状态么?
⊙u⊙ 发表于 2020-7-5 05:35
主要问题不在于能否复原或是否为陷阱箱,而是Lock也就只能在冒险模式里用用 ...
这个系统组是我用来控制我地图里面的箱子
商店不容易触发特性的,加上那张地图的默认
模式就是冒险模式,应该没问题吧?
不能检测方块状态么
lxt123qwe 发表于 2020-8-22 14:19
**** 作者被禁止或删除 内容自动屏蔽 ****
引用上方的回复
箱子的方块状态只有朝向、是否被水淹没、大箱子这三种,没有关闭和开启的
状态,所以要用陷阱箱+红石火把、记分板来检测
还有不要挖坟了,这是几个月前的帖子了吧
用漏斗能转移出来么
防熊指南+1
学废了,我觉得我还可以
66666666666666666666666
 /execute as @e[type=minecraft:area_effect_cloud,tag=LAEC] at @s as @a[distance=..7,scores={openchest=1..}] run data merge block ~ ~ ~ {Lock:"ProtectedChest"} #Lock里面用一串别人永远都不能在铁砧里面改名到的字符,推荐用"§"*(他人不知道也算为一种情况,所以乱输也行),这里方便介绍直接用了ProtectedChest
 /execute as @e[type=minecraft:area_effect_cloud,tag=LAEC] at @s as @a[distance=..7,scores={openchest=1..}] run data merge block ~ ~ ~ {Lock:"ProtectedChest"} #Lock里面用一串别人永远都不能在铁砧里面改名到的字符,推荐用"§"*(他人不知道也算为一种情况,所以乱输也行),这里方便介绍直接用了ProtectedChest /execute as @e[type=minecraft:area_effect_cloud,tag=LAEC] at @s as @a[distance=..7] if block ~ ~1 ~ minecraft:redstone_torch[lit=true] run data merge block ~ ~ ~ {Lock:""}
 /execute as @e[type=minecraft:area_effect_cloud,tag=LAEC] at @s as @a[distance=..7] if block ~ ~1 ~ minecraft:redstone_torch[lit=true] run data merge block ~ ~ ~ {Lock:""}