Browse Source

修改重生与地图大小

LTCatt 5 years ago
parent
commit
0a97663079

+ 11 - 0
data/mini/functions/diamond/game/respawn1.mcfunction

@@ -0,0 +1,11 @@
+
+# 状态效果
+effect clear @s
+effect give @s saturation 1000000 0 true
+effect give @s haste 1000000 1 true
+effect give @s levitation 8 253
+gamerule naturalRegeneration false
+
+# 传送玩家
+spreadplayers 1016 5016 6 8 under 255 false @s[team=playing,tag=!rejoining]
+schedule function mini:diamond/game/respawn2 1t

+ 1 - 0
data/mini/functions/diamond/game/respawn2.mcfunction

@@ -0,0 +1 @@
+tp @s ~ 259 ~

+ 3 - 0
data/mini/functions/diamond/game_end.mcfunction

@@ -6,6 +6,9 @@ gamerule doDaylightCycle false
 gamerule doLimitedCrafting true
 gamerule doLimitedCrafting true
 gamerule keepInventory true
 gamerule keepInventory true
 gamerule doTileDrops false
 gamerule doTileDrops false
+gamerule doEntityDrops false
+gamerule fireDamage false
+gamerule drowningDamage false
 
 
 # 计算得分
 # 计算得分
 execute as @a[team=playing] run scoreboard players operation @s mini_score += @s diamond
 execute as @a[team=playing] run scoreboard players operation @s mini_score += @s diamond

+ 7 - 3
data/mini/functions/diamond/game_init.mcfunction

@@ -6,14 +6,15 @@ scoreboard players set $finish_mode mem 0
 scoreboard players set $survival mem 1
 scoreboard players set $survival mem 1
 
 
 # 调整时间
 # 调整时间
-time set 10500t
+time set 10000t
 
 
 # 生成地图
 # 生成地图
-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:-22,sizeX:20,posZ:0,integrity:1.0f,showair:0b,name:"mini:diamond",sizeY:23,sizeZ:20,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",sizeY:25,sizeZ:32,showboundingbox:1b}
 setblock 1000 255 5001 redstone_block
 setblock 1000 255 5001 redstone_block
 
 
 # 清理残余实体
 # 清理残余实体
-kill @e[type=!player,x=950,y=0,z=4950,dx=100,dy=500,dz=100]
+tp @e[type=!player,x=950,y=-200,z=4950,dx=100,dy=600,dz=100] ~ -100 ~
+kill @e[type=!player,x=950,y=-200,z=4950,dx=100,dy=600,dz=100]
 
 
 # 伤害管理
 # 伤害管理
 scoreboard players set $remove_resistance mem 1
 scoreboard players set $remove_resistance mem 1
@@ -21,9 +22,12 @@ team modify playing friendlyFire true
 team modify playing collisionRule always
 team modify playing collisionRule always
 team modify playing deathMessageVisibility always
 team modify playing deathMessageVisibility always
 gamerule fallDamage true
 gamerule fallDamage true
+gamerule fireDamage true
+gamerule drowningDamage true
 
 
 # Gamerule 调整
 # Gamerule 调整
 # TODO: 换一个更好的让玩家合成的方法
 # TODO: 换一个更好的让玩家合成的方法
 gamerule doLimitedCrafting false
 gamerule doLimitedCrafting false
 gamerule keepInventory false
 gamerule keepInventory false
 gamerule doTileDrops true
 gamerule doTileDrops true
+gamerule doEntityDrops true

+ 4 - 4
data/mini/functions/diamond/game_start.mcfunction

@@ -1,16 +1,16 @@
 gamerule doDaylightCycle true
 gamerule doDaylightCycle true
-scoreboard players set $countdown mem 240
+scoreboard players set $countdown mem 260
 
 
 # HUD
 # HUD
 scoreboard objectives setdisplay list health_disp
 scoreboard objectives setdisplay list health_disp
 scoreboard objectives setdisplay belowName diamond
 scoreboard objectives setdisplay belowName diamond
 scoreboard objectives setdisplay sidebar diamond
 scoreboard objectives setdisplay sidebar diamond
 scoreboard players set $bossbar_color mem 4
 scoreboard players set $bossbar_color mem 4
-scoreboard players set $countdown_max mem 240
+scoreboard players set $countdown_max mem 260
 scoreboard players set $bossbar_type mem 2
 scoreboard players set $bossbar_type mem 2
 function lib:bossbar/show
 function lib:bossbar/show
 bossbar set mini:blue name "剩余时间"
 bossbar set mini:blue name "剩余时间"
 
 
 # 世界边界
 # 世界边界
-worldborder center 1010.0 5010.0
-worldborder set 17.999
+worldborder center 1016.0 5016.0
+worldborder set 29.999

+ 3 - 11
data/mini/functions/diamond/player_death.mcfunction

@@ -1,15 +1,7 @@
 
 
-
-# 状态效果
-effect clear @s
-effect give @s saturation 1000000 0 true
-effect give @s haste 1000000 1 true
-gamerule naturalRegeneration false
+# 执行重生方法
+function mini:diamond/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 slowness 3 3 true
-effect give @s blindness 3 0 true
-
-# 传送玩家
-spreadplayers 1010 5010 6 8 under 246 false @s[team=playing,tag=!rejoining]
+effect give @s blindness 3 5 true

+ 3 - 6
data/mini/functions/diamond/player_enter.mcfunction

@@ -4,12 +4,6 @@ function lib:sounds/music/mini_slow
 title @s clear
 title @s clear
 title @s actionbar ""
 title @s actionbar ""
 
 
-effect clear @s
-effect give @s saturation 1000000 0 true
-effect give @s haste 1000000 1 true
-gamerule naturalRegeneration false
-spreadplayers 1010 5010 6 8 under 246 false @s[team=playing,tag=!rejoining]
-
 # 设置玩家生命
 # 设置玩家生命
 attribute @s generic.max_health base set 20
 attribute @s generic.max_health base set 20
 
 
@@ -21,3 +15,6 @@ scoreboard players set @s[team=playing,tag=!rejoining] diamond 0
 # 调整模式
 # 调整模式
 gamemode spectator @s[team=!debugging]
 gamemode spectator @s[team=!debugging]
 gamemode survival @s[team=playing,tag=!rejoining]
 gamemode survival @s[team=playing,tag=!rejoining]
+
+# 执行重生方法
+function mini:diamond/game/respawn1

+ 1 - 1
data/mini/functions/diamond/player_intro.mcfunction

@@ -1,5 +1,5 @@
 # 向单个玩家展示小游戏介绍
 # 向单个玩家展示小游戏介绍
-tp @s[team=!debugging] 990.34 245.81 5021.73 2043.85 13.77
+tp @s[team=!debugging] 1013.47 247.63 5045.62 -178.86 17.18
 tellraw @s ["",{"text":"\n >> 钻石风暴 >>\n\n","color":"gold","bold":true}," 制作铁镐, 挖取钻石, 然后保住自己的小命!\n 但闪闪发光的钻石也会暴露你的位置……\n"]
 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": " <积分制> ","color":"red","bold": true}, {"text":"太阳落山时游戏即会结束, 然后根据物品栏中的钻石数决定排名。","color":"gray"}]
 tellraw @s ["",{"text": " <PVP> ","color":"light_purple","bold": true}, {"text":"死亡会掉落所有物品, 被击杀后立即复活。","color":"gray"}]
 tellraw @s ["",{"text": " <PVP> ","color":"light_purple","bold": true}, {"text":"死亡会掉落所有物品, 被击杀后立即复活。","color":"gray"}]

+ 2 - 2
data/mini/functions/diamond/watcher_limit.mcfunction

@@ -1,3 +1,3 @@
 # 观察者限制飞行范围
 # 观察者限制飞行范围
-execute as @a[gamemode=spectator,x=1010,y=240,z=5010,distance=40..] run spectate
-tp @a[gamemode=spectator,x=1010,y=240,z=5010,distance=40..,team=!debugging] 1010 250 1010
+execute as @a[gamemode=spectator,x=1016,y=240,z=5016,distance=70..] run spectate
+tp @a[gamemode=spectator,x=1016,y=240,z=5016,distance=70..,team=!debugging] 1016 255 1016