Просмотр исходного кода

Merge branch 'master' of https://github.com/LTCatt/LTW3

LTCatt 6 лет назад
Родитель
Сommit
f84cd41026

+ 14 - 0
data/lib/functions/effect/special_block.mcfunction

@@ -0,0 +1,14 @@
+# 5tick运行一次 计分板单位5tick
+# 钻石:起飞
+execute as @a[gamemode=!spectator] if score @s effect_floating matches 1.. run scoreboard players add @s effect_floating 1
+execute as @a[gamemode=!spectator] if score @s effect_floating matches 3.. run effect clear @s levitation
+execute as @a[gamemode=!spectator] if score @s effect_floating matches 3.. run scoreboard players set @s effect_floating 0
+execute as @a[gamemode=!spectator] unless score @s effect_floating matches 1.. at @s if block ~ ~-1 ~ diamond_block run effect give @s levitation 1 12 true
+execute as @a[gamemode=!spectator] unless score @s effect_floating matches 1.. at @s if block ~ ~-1 ~ diamond_block run effect give @s slow_falling 2 0 true
+execute as @a[gamemode=!spectator] unless score @s effect_floating matches 1.. at @s if block ~ ~-1 ~ diamond_block run scoreboard players set @s effect_floating 1
+# 绿宝石:回血
+execute as @a[gamemode=!spectator] if score @s effect_regen matches 1.. run scoreboard players add @s effect_regen 1
+execute as @a[gamemode=!spectator] if score @s effect_regen matches 5.. run effect clear @s regeneration
+execute as @a[gamemode=!spectator] if score @s effect_regen matches 5.. run scoreboard players set @s effect_regen 0
+execute as @a[gamemode=!spectator] unless score @s effect_regen matches 1.. at @s if block ~ ~-1 ~ emerald_block run effect give @s regeneration 2 2 true
+execute as @a[gamemode=!spectator] unless score @s effect_regen matches 1.. at @s if block ~ ~-1 ~ emerald_block run scoreboard players set @s effect_regen 1

+ 1 - 1
data/ltw/functions/clock/tick2.mcfunction

@@ -17,4 +17,4 @@ function item:tick2
 
 # 全局倒计时
 execute if score $countdown_fast mem matches 1.. run scoreboard players remove $countdown_fast mem 1
-scoreboard players remove @e[scores={countdown_fast=1..}] countdown_fast 1
+scoreboard players remove @e[scores={countdown_fast=1..}] countdown_fast 1

+ 0 - 3
data/ltw/functions/clock/tick20.mcfunction

@@ -21,6 +21,3 @@ execute if score $twice mem matches 2.. run scoreboard players set $twice mem 0
 # 掐死原版 BGM
 stopsound @a music music.game
 stopsound @a music music.creative
-
-# 特殊方块给予效果
-execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ emerald_block run effect give @s regeneration 2 2 true

+ 1 - 2
data/ltw/functions/clock/tick5.mcfunction

@@ -10,5 +10,4 @@ function ltw:main/tick5
 execute as @a[scores={death=1..,health=1..}] at @s run function ltw:main/player_death
 
 # 特殊方块给予效果
-execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ diamond_block run effect give @s levitation 1 5 true
-execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ diamond_block run effect give @s slow_falling 2 0 true
+function lib:effect/special_block

+ 4 - 0
data/ltw/functions/init.mcfunction

@@ -51,6 +51,10 @@ scoreboard objectives remove leave_game
 scoreboard objectives add leave_game minecraft.custom:leave_game "离开游戏"
 scoreboard objectives remove game_id
 scoreboard objectives add game_id dummy "游戏编号"
+scoreboard objectives remove effect_floating
+scoreboard objectives add effect_floating dummy "悬浮计时"
+scoreboard objectives remove effect_regen
+scoreboard objectives add effect_regen dummy "恢复计时"
 scoreboard players set $ game_id 0
 
 # 商店系统记分板

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

@@ -14,7 +14,7 @@ setblock 1000 10 2032 minecraft:redstone_block
 setblock 1032 9 2000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:9,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun100",sizeY:32,sizeZ:32,showboundingbox:0b}
 setblock 1032 10 2000 minecraft:redstone_block
 ##101
-setblock 1032 9 2032 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:9,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun101",sizeY:32,sizeZ:8,showboundingbox:10}
+setblock 1032 9 2032 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:9,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun101",sizeY:32,sizeZ:8,showboundingbox:0b}
 setblock 1032 10 2032 minecraft:redstone_block
 ##010
 setblock 1000 52 2000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:-10,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun010",sizeY:10,sizeZ:32,showboundingbox:0b}