我的世界指令制作私人仓库/雪球菜单/1秒创建/每人一个/无需实体/自动分配...

指令内容:
一.聊天栏输入:
1.关闭命令提示
/gamerule commandblockoutput false
2.创建三个计分板
/scoreboard objectives add x dummy
用于tp玩家或盔甲架
/scoreboard objectives add 储存x dummy
用于储存坐标
/scoreboard objectives add xc dummy
用于菜单
二.命令方块内指令
<按照先后排序>
<有条件或无条件请对照视频或者写在上面了>
1.菜单指令内容
①给鱼钩为半径三格之内最近的玩家xc计分板加1分
循环无条件保持开启
execute @e[type=fishing_hook] ~ ~ ~ execute @a[r=3,c=1] ~ ~ ~ scoreboard players add @s xc 1
②菜单切换音效
链锁有条件保持开启(以下简称为有)
execute @e[type=fishing_hook] ~ ~ ~ execute @a[r=3,scores={xc=1..}] ~ ~ ~ playsound note.pling @s
③清除鱼钩
链锁无条件保持开启(以下简称为无)
execute @e[type=fishing_hook] ~ ~ ~ tp ~ ~-10000 ~
④给计分板xc为1的玩家显示内容<效果如图所示>你可以自己换ui
无
title @a[scores={xc=1}] actionbar §8MENU §r§b§l创建仓库 §r§7回仓库
⑤给计分板xc为2的玩家显示内容<效果如图所示>你可以自己换ui
无
title @a[scores={xc=2}] actionbar §8MENU §r§7创建仓库 §r§b§l回仓库
⑥给xc计分板为3的玩家切换成1
无
scoreboard players set @a[scores={xc=3..}] xc 1
以下是创建仓库的指令<⑦~1⑥>
⑦给有"已仓库"标签且xc分数为1并抬头的玩家显示如下内容
无
title @a[scores={xc=1},rx=-85,tag=已仓库] actionbar §7§l但是你已经有了一个仓库
⑧给有"已仓库"标签且xc分数为1并抬头的玩家归零xc分数<也就是关闭菜单>
有
scoreboard players set @a[scores={xc=1},rx=-85] xc 0
⑨给没有"已仓库"标签且xc分数为1并抬头的玩家添加"已仓库"标签
无
tag @a[scores={xc=1},rx=-85] add 已仓库
⑩生成盔甲架用于生成仓库
有
summon armor_stand 定位
1①将定位过渡到x计分板分数增加5<原理是分配uid,可以自行查阅>
有
scoreboard players add 定位过渡 x 5
1②将定位过渡的x分数赋值给盔甲架<原理是分配uid,可以自行查阅>
有
scoreboard players operation @e[name=定位,type=armor_stand] x = 定位过渡 x
1③将定位过渡的x分数赋值给没有"已仓库"标签且xc分数为1并抬头玩家的计分板储存x分数上
有
scoreboard players operation @a[scores={xc=1},rx=-85] 储存x = 定位过渡 x
1④执行生成仓库链<往后翻能看到生成仓库链的指令,做完这条链之后再回来把xyz坐标写好,xyz的坐标就是生成仓库链开头的脉冲命令方块旁边任意一个可以对这个命令方块产生红石信号的位置>
有
setblock x坐标 y坐标 z坐标 redstone_block
1⑤给那个玩家显示创建成功
有
title @a[scores={xc=1},rx=-85] actionbar §b§l创建成功!
1⑥给那个玩家关闭菜单
有
scoreboard players set @a[scores={xc=1},rx=-85] xc 0
以下是返回仓库的指令<1⑦~2①>
1⑦给xc分数为2且抬头但没有"已仓库"标签的玩家显示如下内容
无
title @p[scores={xc=2},rx=-85,tag=!已仓库] actionbar §7§l但是你并没有一个仓库
1⑧给那个玩家关闭菜单
有
scoreboard players set @a[scores={xc=2},rx=-85] xc 0
1⑨给xc分数为2并抬头且有"已仓库"标签的玩家的储存x计分板分数赋值给x的计分板分数
无
scoreboard players operation @a[scores={xc=2},rx=-85,tag=已仓库] x = @p[scores={xc=2},rx=-85,tag=已仓库] 储存x
1⑩执行返回仓库链<往后翻能看到返回仓库链的指令,做完这条链之后再回来把xyz坐标写好,xyz的坐标就是返回仓库链开头的脉冲命令方块旁边任意一个可以对这个命令方块产生红石信号的位置>
有
setblock 7 -60 -29 redstone_block
2①给那个玩家关闭菜单
有
scoreboard players set @a[scores={xc=2},rx=-85] xc 0
以下的菜单指令都是关闭菜单的显示以及执行
2②
无
title @a[scores={xc=1..},rxm=85] actionbar §7§l菜单关闭
2③
有
scoreboard players set @a[scores={xc=1..},rxm=85] xc 0
2.生成仓库链
其实生成仓库链和返回仓库链的二分法传送除了开头第一个命令不一样其他都是一样的<②~2⑦>,所以在这里提醒一下,你做完生成仓库链可以直接把生成仓库链的二分法复制到返回仓库链的二分法,这样可以节省很多时间
以下都是二分法传送,没什么好讲的
①脉冲无条件红石控制
tp @e[scores={x=1..}] 0 -40 0
②链锁无条件保持开启(以下简称为"无")
execute @e[scores={x=2048..}] ~ ~ ~ tp ~2048 ~ ~
③链锁有条件保持开启(以下简称为"有")
scoreboard players remove @e[scores={x=2048..}] x 2048
④无
execute @e[scores={x=1024..}] ~ ~ ~ tp ~1024 ~ ~
⑤有
scoreboard players remove @e[scores={x=1024..}] x 1024
⑥无
execute @e[scores={x=512..}] ~ ~ ~ tp ~512 ~ ~
⑦有
scoreboard players remove @e[scores={x=512..}] x 512
⑧无
execute @e[scores={x=256..}] ~ ~ ~ tp ~256 ~ ~
⑨有
scoreboard players remove @e[scores={x=256..}] x 256
⑩无
execute @e[scores={x=128..}] ~ ~ ~ tp ~128 ~ ~
1①有
scoreboard players remove @e[scores={x=128..}] x 128
1②无
execute @e[scores={x=32..}] ~ ~ ~ tp ~32 ~ ~
1③有
scoreboard players remove @e[scores={x=32..}] x 32
1④无
execute @e[scores={x=32..}] ~ ~ ~ tp ~32 ~ ~
1⑤有
scoreboard players remove @e[scores={x=32..}] x 32
1⑥无
execute @e[scores={x=32..}] ~ ~ ~ tp ~32 ~ ~
1⑦有
scoreboard players remove @e[scores={x=32..}] x 32
1⑧无
execute @e[scores={x=16..}] ~ ~ ~ tp ~16 ~ ~
1⑨有
scoreboard players remove @e[scores={x=16..}] x 16
1⑩无
execute @e[scores={x=8..}] ~ ~ ~ tp ~8 ~ ~
2①有
scoreboard players remove @e[scores={x=8..}] x 8
2②无
execute @e[scores={x=4..}] ~ ~ ~ tp ~4 ~ ~
2③有
scoreboard players remove @e[scores={x=4..}] x 4
2④无
execute @e[scores={x=2..}] ~ ~ ~ tp ~2 ~ ~
2⑤有
scoreboard players remove @e[scores={x=2..}] x 2
2⑥无
execute @e[scores={x=1}] ~ ~ ~ tp ~1 ~ ~
2⑦有
scoreboard players remove @e[scores={x=1}] x 1
2⑧无
execute @e[name=定位] ~~~ structure load 仓库 ~~~
2⑨xyz为红石块的位置<无>
setblock x坐标 y坐标 z 坐标 air
2⑩无
kill @e[name=定位]
3.返回仓库链
这条链的指令除了①从2⑧开始,因为中间那些指令和上面的生成仓库指令是一样的<②~2⑦>
①脉冲无条件红石控制
tp @e[scores={x=1..}] 1 -39 3
②~2⑦同上
2⑧
2⑨xyz为这条链红石块所在位置<无>
setblock x坐标 y坐标 z坐标 air