202207031901

This commit is contained in:
延皓
2022-07-03 19:01:51 +08:00
parent 2e3b933e9b
commit d8d5b7b677
37 changed files with 151 additions and 41 deletions
+8
View File
@@ -1,4 +1,12 @@
scoreboard objectives add fz.event.play_seconds minecraft.custom:play_time
scoreboard objectives add fz.event.leave_game minecraft.custom:leave_game
scoreboard objectives add fz.event.aviating_distance minecraft.custom:aviate_one_cm
scoreboard objectives add fz.event.damage_taken minecraft.custom:damage_taken
scoreboard objectives add fz.event.fishing_count minecraft.custom:fish_caught
##
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已初始化系统组件:事件"}]
@@ -0,0 +1,6 @@
scoreboard players operation fz.var.score fz.variable.integer = @s fz.event.aviating_distance
function #fz:event/on_aviate_one_meter
scoreboard players operation @s fz.event.aviating_distance %= 200 fz.variable.integer
advancement revoke @s only fz:event/on_aviate_one_meter
@@ -0,0 +1,6 @@
scoreboard players operation fz.var.score fz.variable.integer = @s fz.event.damage_taken
function #fz:event/on_damage_taken
scoreboard players set @s fz.event.damage_taken 0
advancement revoke @s only fz:event/on_damage_taken
+7 -2
View File
@@ -4,8 +4,13 @@ execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @
function #fz:event/on_login
##
advancement revoke @s until fz:unsneak
advancement revoke @s until fz:event/on_damage_taken
advancement revoke @s until fz:event/on_piglin_trade
advancement revoke @s until fz:event/on_play_one_hour
advancement revoke @s until fz:event/on_sneak
advancement revoke @s until fz:event/on_unsneak
advancement revoke @s until fz:event/on_villager_trade
##
scoreboard players set @s fz.event.leave_game 0
advancement revoke @s only fz:login
advancement revoke @s only fz:event/on_login
@@ -1,2 +1,2 @@
function #fz:event/on_piglin_trade
advancement revoke @s only fz:piglin_trade
advancement revoke @s only fz:event/on_piglin_trade
@@ -1,4 +1,6 @@
scoreboard players operation fz.var.score fz.variable.integer = @s fz.event.play_seconds
function #fz:event/on_play_one_hour
scoreboard players remove @s fz.module.scoreboard.assign.activation 3600
advancement revoke @s only fz:play_one_hour
scoreboard players operation @s fz.event.play_seconds %= 3600 fz.variable.integer
advancement revoke @s only fz:event/on_play_one_hour
@@ -9,4 +9,4 @@ function #fz:event/on_unsneak
execute if entity @s[x_rotation = -90] run function #fz:event/module/config/on_config
##
advancement revoke @s until fz:unsneak
advancement revoke @s until fz:event/on_unsneak
@@ -1,2 +1,2 @@
function #fz:event/on_villager_trade
advancement revoke @s only fz:villager_trade
advancement revoke @s only fz:event/on_villager_trade
+2
View File
@@ -2,6 +2,8 @@
##
scoreboard players set 10 fz.variable.integer 10
scoreboard players set 200 fz.variable.integer 200
scoreboard players set 3600 fz.variable.integer 3600
function #fz:module/try_load
@@ -1,15 +1,3 @@
# 源计分板
##
scoreboard objectives add fz.module.scoreboard.assign.general dummy
###
scoreboard objectives add fz.module.scoreboard.assign.activation minecraft.custom:play_time
###
scoreboard objectives add fz.module.scoreboard.assign.aviating_distance minecraft.custom:aviate_one_cm
### M榜
scoreboard objectives add fz.module.scoreboard.assign.damage_taken minecraft.custom:damage_taken
###
scoreboard objectives add fz.module.scoreboard.assign.fishing_count minecraft.custom:fish_caught
@@ -1,3 +1,3 @@
scoreboard players add @s fz.module.scoreboard.display.activation 1
scoreboard players add fz.module.scoreboard.total.activation fz.module.scoreboard.assign.general 1
function #fz:module/scoreboard/assign/set_display/custom_total_name/activation
function #fz:module/scoreboard/assign/set_display/total_name/activation
@@ -0,0 +1,4 @@
scoreboard players operation fz.var.score fz.variable.integer /= 200 fz.variable.integer
scoreboard players operation @s fz.module.scoreboard.display.aviating_distance += fz.var.score fz.variable.integer
scoreboard players operation fz.module.scoreboard.total.aviating_distance fz.module.scoreboard.assign.general += fz.var.score fz.variable.integer
function #fz:module/scoreboard/assign/set_display/total_name/aviating_distance
@@ -0,0 +1,3 @@
scoreboard players operation @s fz.module.scoreboard.display.damage_taken += fz.var.score fz.variable.integer
scoreboard players operation fz.module.scoreboard.total.damage_taken fz.module.scoreboard.assign.general += fz.var.score fz.variable.integer
function #fz:module/scoreboard/assign/set_display/total_name/damage_taken
@@ -0,0 +1,2 @@
scoreboard players operation fz.module.scoreboard.display.general = fz.module.scoreboard.total.aviating_distance fz.module.scoreboard.assign.general
scoreboard players operation fz.module.scoreboard.display.aviating_distance = fz.module.scoreboard.total.aviating_distance fz.module.scoreboard.assign.general
@@ -0,0 +1,2 @@
scoreboard players operation fz.module.scoreboard.display.general = fz.module.scoreboard.total.damage_taken fz.module.scoreboard.assign.general
scoreboard players operation fz.module.scoreboard.display.damage_taken = fz.module.scoreboard.total.damage_taken fz.module.scoreboard.assign.general
@@ -1,3 +1,3 @@
scoreboard players add @s fz.module.scoreboard.display.trade_count 1
scoreboard players add fz.module.scoreboard.total.trade_count fz.module.scoreboard.assign.general 1
function #fz:module/scoreboard/assign/set_display/custom_total_name/trade_count
function #fz:module/scoreboard/assign/set_display/total_name/trade_count