瀏覽代碼

清理部分代码

LTCatt 5 年之前
父節點
當前提交
f6f66ce794

+ 0 - 2
data/mini/functions/diamond/player_finished.mcfunction

@@ -1,2 +0,0 @@
-# 玩家成功时由玩家自己触发
-function mini:main/player_finished

+ 0 - 84
data/mini/functions/trade/game/pop_slot.mcfunction

@@ -1,84 +0,0 @@
-execute if block 1000 0 5001 minecraft:bedrock run scoreboard players set @s item_slot 0
-execute if block 1000 0 5001 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1000 0 5002 minecraft:bedrock run scoreboard players set @s item_slot 1
-execute if block 1000 0 5002 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1000 0 5003 minecraft:bedrock run scoreboard players set @s item_slot 2
-execute if block 1000 0 5003 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1000 0 5004 minecraft:bedrock run scoreboard players set @s item_slot 3
-execute if block 1000 0 5004 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1001 0 5001 minecraft:bedrock run scoreboard players set @s item_slot 4
-execute if block 1001 0 5001 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1001 0 5002 minecraft:bedrock run scoreboard players set @s item_slot 5
-execute if block 1001 0 5002 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1001 0 5003 minecraft:bedrock run scoreboard players set @s item_slot 6
-execute if block 1001 0 5003 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1001 0 5004 minecraft:bedrock run scoreboard players set @s item_slot 7
-execute if block 1001 0 5004 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1002 0 5001 minecraft:bedrock run scoreboard players set @s item_slot 8
-execute if block 1002 0 5001 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1002 0 5002 minecraft:bedrock run scoreboard players set @s item_slot 9
-execute if block 1002 0 5002 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1002 0 5003 minecraft:bedrock run scoreboard players set @s item_slot 10
-execute if block 1002 0 5003 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1002 0 5004 minecraft:bedrock run scoreboard players set @s item_slot 11
-execute if block 1002 0 5004 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1003 0 5001 minecraft:bedrock run scoreboard players set @s item_slot 12
-execute if block 1003 0 5001 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1003 0 5002 minecraft:bedrock run scoreboard players set @s item_slot 13
-execute if block 1003 0 5002 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1003 0 5003 minecraft:bedrock run scoreboard players set @s item_slot 14
-execute if block 1003 0 5003 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1003 0 5004 minecraft:bedrock run scoreboard players set @s item_slot 15
-execute if block 1003 0 5004 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1004 0 5001 minecraft:bedrock run scoreboard players set @s item_slot 16
-execute if block 1004 0 5001 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1004 0 5002 minecraft:bedrock run scoreboard players set @s item_slot 17
-execute if block 1004 0 5002 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1004 0 5003 minecraft:bedrock run scoreboard players set @s item_slot 18
-execute if block 1004 0 5003 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1004 0 5004 minecraft:bedrock run scoreboard players set @s item_slot 19
-execute if block 1004 0 5004 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1005 0 5001 minecraft:bedrock run scoreboard players set @s item_slot 20
-execute if block 1005 0 5001 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1005 0 5002 minecraft:bedrock run scoreboard players set @s item_slot 21
-execute if block 1005 0 5002 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1005 0 5003 minecraft:bedrock run scoreboard players set @s item_slot 22
-execute if block 1005 0 5003 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1005 0 5004 minecraft:bedrock run scoreboard players set @s item_slot 23
-execute if block 1005 0 5004 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1006 0 5001 minecraft:bedrock run scoreboard players set @s item_slot 24
-execute if block 1006 0 5001 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1006 0 5002 minecraft:bedrock run scoreboard players set @s item_slot 25
-execute if block 1006 0 5002 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1006 0 5003 minecraft:bedrock run scoreboard players set @s item_slot 26
-execute if block 1006 0 5003 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1006 0 5004 minecraft:bedrock run scoreboard players set @s item_slot 27
-execute if block 1006 0 5004 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1007 0 5001 minecraft:bedrock run scoreboard players set @s item_slot 28
-execute if block 1007 0 5001 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1007 0 5002 minecraft:bedrock run scoreboard players set @s item_slot 29
-execute if block 1007 0 5002 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1007 0 5003 minecraft:bedrock run scoreboard players set @s item_slot 30
-execute if block 1007 0 5003 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1007 0 5004 minecraft:bedrock run scoreboard players set @s item_slot 31
-execute if block 1007 0 5004 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1008 0 5001 minecraft:bedrock run scoreboard players set @s item_slot 32
-execute if block 1008 0 5001 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1008 0 5002 minecraft:bedrock run scoreboard players set @s item_slot 33
-execute if block 1008 0 5002 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1008 0 5003 minecraft:bedrock run scoreboard players set @s item_slot 34
-execute if block 1008 0 5003 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1008 0 5004 minecraft:bedrock run scoreboard players set @s item_slot 35
-execute if block 1008 0 5004 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1009 0 5001 minecraft:bedrock run scoreboard players set @s item_slot 100
-execute if block 1009 0 5001 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1009 0 5002 minecraft:bedrock run scoreboard players set @s item_slot 101
-execute if block 1009 0 5002 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1009 0 5003 minecraft:bedrock run scoreboard players set @s item_slot 102
-execute if block 1009 0 5003 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute if block 1009 0 5004 minecraft:bedrock run scoreboard players set @s item_slot 103
-execute if block 1009 0 5004 minecraft:bedrock at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item
-execute store result score #fill_count temp run fill 1000 0 5001 1009 0 5004 air
-scoreboard players operation #fill_count temp %= #const_2 temp
-execute if score #fill_count temp matches 1 run scoreboard players set @s item_slot -106
-execute if score #fill_count temp matches 1 at @e[type=armor_stand,tag=dead_marker,limit=1] run function item:pop_slot/pop_item

+ 0 - 4
data/mini/functions/trade/game/random_slot.mcfunction

@@ -1,4 +0,0 @@
-setblock 1000 0 5000 minecraft:structure_block{posX:0,posY:0,posZ:1,mode:"LOAD",name:"item:inventory",integrity:0.5f}
-fill 1000 0 5001 1009 0 5004 air
-setblock 1000 1 5000 air
-setblock 1000 1 5000 redstone_block

+ 1 - 1
data/mini/functions/trade/game_init.mcfunction

@@ -9,7 +9,7 @@ scoreboard players set $survival mem 1
 time set 8600t
 time set 8600t
 
 
 # 生成地图
 # 生成地图
-setblock 1000 255 5000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"LTCat",rotation:"NONE",posX:0,mode:"LOAD",posY:-24,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:emerald_base",sizeY:25,sizeZ:32,showboundingbox:1b}
+setblock 1000 255 5000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"LTCat",rotation:"NONE",posX:0,mode:"LOAD",posY:-24,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:diamond_base",sizeY:25,sizeZ:32,showboundingbox:1b}
 setblock 1000 255 5001 redstone_block
 setblock 1000 255 5001 redstone_block
 schedule function mini:trade/game_init2 1t append
 schedule function mini:trade/game_init2 1t append
 
 

+ 0 - 23
data/mini/functions/trade/player_death.mcfunction

@@ -4,26 +4,3 @@ function mini:trade/game/respawn1
 # 复活特效
 # 复活特效
 execute as @a at @s run function lib:sounds/error
 execute as @a at @s run function lib:sounds/error
 effect give @s blindness 3 0 true
 effect give @s blindness 3 0 true
-
-# 处理玩家掉落物品
-# 获取玩家死亡位置
-kill @e[type=armor_stand,tag=dead_marker]
-summon armor_stand 1000 0 5000 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["dead_marker"]}
-execute store result entity @e[type=armor_stand,tag=dead_marker,limit=1] Pos[0] double 1 run scoreboard players get @s posX
-execute store result entity @e[type=armor_stand,tag=dead_marker,limit=1] Pos[1] double 1 run scoreboard players get @s posY
-execute store result entity @e[type=armor_stand,tag=dead_marker,limit=1] Pos[2] double 1 run scoreboard players get @s posZ
-# 单独处理绿宝石
-execute store result score #emerald_count temp run clear @s emerald
-scoreboard players add #emerald_count temp 1
-execute at @e[type=armor_stand,tag=dead_marker,limit=1] run summon item ~ ~ ~ {Tags:["temp_emerald"],Item:{id:"minecraft:emerald",Count:1b},Glowing:1b}
-execute as @e[type=item,tag=temp_emerald,limit=1] store result entity @s Item.Count byte 0.5 run scoreboard players get #emerald_count temp
-tag @e[type=item,tag=temp_emerald,limit=1] remove temp_emerald
-# 随机槽位掉落
-function mini:trade/game/random_slot
-function mini:trade/game/pop_slot
-# 返还绿宝石
-scoreboard players remove #emerald_count temp 1
-scoreboard players operation #emerald_count temp /= #const_2 mem
-execute if score #emerald_count temp matches 1.. run function mini:trade/game/give_emerald
-# 删除marker
-kill @e[type=armor_stand,tag=dead_marker]

+ 0 - 1
data/mini/functions/trade/player_enter.mcfunction

@@ -10,7 +10,6 @@ recipe give @s *
 attribute @s generic.max_health base set 20
 attribute @s generic.max_health base set 20
 
 
 # 计分板重置
 # 计分板重置
-tag @s remove emerald_got
 scoreboard players reset @s emerald
 scoreboard players reset @s emerald
 scoreboard players set @s[team=playing,tag=!rejoining] emerald 0
 scoreboard players set @s[team=playing,tag=!rejoining] emerald 0
 
 

+ 0 - 2
data/mini/functions/trade/player_finished.mcfunction

@@ -1,2 +0,0 @@
-# 玩家成功时由玩家自己触发
-function mini:main/player_finished

+ 4 - 4
data/mini/functions/trade/player_intro.mcfunction

@@ -2,8 +2,8 @@
 tp @s[team=!debugging] 1013.47 247.63 5045.62 -178.86 17.18
 tp @s[team=!debugging] 1013.47 247.63 5045.62 -178.86 17.18
 worldborder set 1000000
 worldborder set 1000000
 effect give @s[team=!debugging] night_vision 1000000 0 true
 effect give @s[team=!debugging] night_vision 1000000 0 true
-tellraw @s ["",{"text":"\n >> 不是钻石风暴 >>\n\n","color":"gold","bold":true}," 制作铁镐, 挖取钻石, 然后保住自己的小命!\n 不过, 或许也可以去地牢碰碰运气……\n"]
-tellraw @s ["",{"text": " <积分制> ","color":"red","bold": true}, {"text":"太阳落山时游戏即会结束, 然后根据持有的钻石数排名。","color":"gray"}]
-tellraw @s ["",{"text": " <PVP> ","color":"light_purple","bold": true}, {"text":"死亡会掉落一半物品, 被击杀后能立即复活。","color":"gray"}]
-tellraw @s ["",{"text": " <原型> ","color":"gold","bold": true}, {"text":"此游戏目前仅用于玩法测试, 尚未进行修缮。","color":"gray"}]
+tellraw @s ["",{"text":"\n >> 不是钻石风暴 >>\n\n","color":"gold","bold":true}," 与村民交易, 尽快获取绿宝石!\n"]
+tellraw @s ["",{"text": " <积分制> ","color":"red","bold": true}, {"text":"太阳落山时游戏即会结束, 然后根据持有的绿宝石数排名。","color":"gray"}]
+tellraw @s ["",{"text": " <PVE> ","color":"light_purple","bold": true}, {"text":"玩家不能 PVP, 死亡不会掉落且能立即复活。","color":"gray"}]
+tellraw @s ["",{"text": " <早期测试> ","color":"dark_red","bold": true}, {"text":"此游戏目前还在早期测试, 什么鬼事情都有可能发生!","color":"dark_red"}]
 tellraw @s ""
 tellraw @s ""

+ 0 - 13
data/mini/functions/trade/tick20.mcfunction

@@ -5,19 +5,6 @@ execute if score $countdown mem matches ..10 run title @a subtitle {"score":{"na
 execute if score $countdown mem matches ..10 run title @a title [""]
 execute if score $countdown mem matches ..10 run title @a title [""]
 execute if score $countdown mem matches ..10 as @a at @s run function lib:sounds/hit2
 execute if score $countdown mem matches ..10 as @a at @s run function lib:sounds/hit2
 
 
-# 170s:关闭循环播放
-execute if score $countdown mem matches 170 run scoreboard players set @a music_time 999
-
-# 90s / 60s:雷达提示
-execute if score $countdown mem matches 90 run tellraw @a ["",{"text": ">> ","color": "gold","bold": true},{"text":"玩家雷达将在 ","color": "gold"}, "30 秒 ",{"text": "后开启","color": "gold"}]
-execute if score $countdown mem matches 90 run scoreboard players set $bossbar_color mem 2
-execute if score $countdown mem matches 90 run function lib:bossbar/show
-execute if score $countdown mem matches 61 as @a run function lib:sounds/music/mini_fast
-execute if score $countdown mem matches 60 run tellraw @a ["",{"text": ">> ","color": "gold","bold": true},{"text": "玩家雷达已开启, 游戏将在 ","color": "gold"},"60 秒 ", {"text": "后结束","color": "gold"}]
-execute if score $countdown mem matches 60 run scoreboard players set $bossbar_color mem 1
-execute if score $countdown mem matches 60 run scoreboard objectives setdisplay belowName emerald
-execute if score $countdown mem matches 60 run function lib:bossbar/show
-
 # 0s:游戏结束
 # 0s:游戏结束
 execute if score $countdown mem matches 0 run function mini:main/game_end
 execute if score $countdown mem matches 0 run function mini:main/game_end
 
 

+ 1 - 12
data/mini/functions/trade/tick5.mcfunction

@@ -1,14 +1,3 @@
 
 
-# 更新钻石数量
+# 更新绿宝石数量
 execute as @a[team=playing] store result score @s emerald run clear @s emerald 0
 execute as @a[team=playing] store result score @s emerald run clear @s emerald 0
-execute if score $countdown mem matches ..60 run effect give @a[team=playing] glowing 1000000 0 true
-# effect give @a[scores={emerald=1..}] glowing 5 0 true
-
-# 显示提示
-execute as @a[scores={emerald=1..},tag=!emerald_got,x=1000,y=0,z=5000,dx=32,dy=253,dz=32] run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s"},{"text":" 获得了闪闪发光的绿宝石","color":"aqua"}]
-execute as @a[scores={emerald=1..},tag=!emerald_got,x=1000,y=0,z=5000,dx=32,dy=253,dz=32] as @a run function lib:sounds/hit
-tag @a remove emerald_got
-tag @a[scores={emerald=1..}] add emerald_got
-
-# 钻石发光
-execute as @e[type=minecraft:item,nbt={Item:{id:"minecraft:emerald"}}] run data modify entity @s Glowing set value 1b