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

View File

@ -0,0 +1,23 @@
{
"criteria": {
"on_aviate_one_meter": {
"trigger": "minecraft:tick",
"conditions": {
"player": [
{
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"fz.event.aviating_distance": {
"min": 200
}
}
}
]
}
}
},
"rewards": {
"function": "fz:event/on_aviate_one_meter"
}
}

View File

@ -0,0 +1,23 @@
{
"criteria": {
"on_damage_taken": {
"trigger": "minecraft:tick",
"conditions": {
"player": [
{
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"fz.event.damage_taken": {
"min": 1
}
}
}
]
}
}
},
"rewards": {
"function": "fz:event/on_damage_taken"
}
}

View File

@ -1,6 +1,6 @@
{ {
"criteria": { "criteria": {
"login": { "on_login": {
"trigger": "tick", "trigger": "tick",
"conditions": { "conditions": {
"player": [ "player": [

View File

@ -1,6 +1,6 @@
{ {
"criteria": { "criteria": {
"piglin_trade": { "on_piglin_trade": {
"trigger": "minecraft:thrown_item_picked_up_by_entity", "trigger": "minecraft:thrown_item_picked_up_by_entity",
"conditions": { "conditions": {
"entity": { "entity": {

View File

@ -1,6 +1,6 @@
{ {
"criteria": { "criteria": {
"play_one_hour": { "on_play_one_hour": {
"trigger": "minecraft:tick", "trigger": "minecraft:tick",
"conditions": { "conditions": {
"player": [ "player": [
@ -8,7 +8,7 @@
"condition": "minecraft:entity_scores", "condition": "minecraft:entity_scores",
"entity": "this", "entity": "this",
"scores": { "scores": {
"fz.module.scoreboard.assign.activation": { "fz.event.play_seconds": {
"min": 3600 "min": 3600
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"criteria": { "criteria": {
"sneak": { "on_sneak": {
"trigger": "minecraft:tick", "trigger": "minecraft:tick",
"conditions": { "conditions": {
"player": { "player": {

View File

@ -1,7 +1,7 @@
{ {
"parent": "fz:sneak", "parent": "fz:sneak",
"criteria": { "criteria": {
"unsneak": { "on_unsneak": {
"trigger": "minecraft:tick", "trigger": "minecraft:tick",
"conditions": { "conditions": {
"player": { "player": {

View File

@ -1,6 +1,6 @@
{ {
"criteria": { "criteria": {
"villager_trade": { "on_villager_trade": {
"trigger": "minecraft:villager_trade" "trigger": "minecraft:villager_trade"
} }
}, },

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.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": "已初始化系统组件:事件"}] execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已初始化系统组件:事件"}]

View File

@ -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

View File

@ -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

View File

@ -4,8 +4,13 @@ execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @
function #fz:event/on_login 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 scoreboard players set @s fz.event.leave_game 0
advancement revoke @s only fz:login advancement revoke @s only fz:event/on_login

View File

@ -1,2 +1,2 @@
function #fz:event/on_piglin_trade function #fz:event/on_piglin_trade
advancement revoke @s only fz:piglin_trade advancement revoke @s only fz:event/on_piglin_trade

View File

@ -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 function #fz:event/on_play_one_hour
scoreboard players remove @s fz.module.scoreboard.assign.activation 3600 scoreboard players operation @s fz.event.play_seconds %= 3600 fz.variable.integer
advancement revoke @s only fz:play_one_hour advancement revoke @s only fz:event/on_play_one_hour

View File

@ -9,4 +9,4 @@ function #fz:event/on_unsneak
execute if entity @s[x_rotation = -90] run function #fz:event/module/config/on_config 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

View File

@ -1,2 +1,2 @@
function #fz:event/on_villager_trade function #fz:event/on_villager_trade
advancement revoke @s only fz:villager_trade advancement revoke @s only fz:event/on_villager_trade

View File

@ -2,6 +2,8 @@
## 常量 ## 常量
scoreboard players set 10 fz.variable.integer 10 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 function #fz:module/try_load

View File

@ -1,15 +1,3 @@
# 源计分板 # 源计分板
## 总榜 ## 总榜
scoreboard objectives add fz.module.scoreboard.assign.general dummy 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

View File

@ -1,3 +1,3 @@
scoreboard players add @s fz.module.scoreboard.display.activation 1 scoreboard players add @s fz.module.scoreboard.display.activation 1
scoreboard players add fz.module.scoreboard.total.activation fz.module.scoreboard.assign.general 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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,3 +1,3 @@
scoreboard players add @s fz.module.scoreboard.display.trade_count 1 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 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

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"#fz:module/scoreboard/assign/set_display/aviating_distance"
]
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"#fz:module/scoreboard/assign/set_display/damage_taken"
]
}

View File

@ -1,6 +1,6 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"#fz:module/scoreboard/assign/set_display/activation"
] ]
} }

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fz:module/scoreboard/assign/set_display/aviating_distance"
]
}

View File

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"fz:module/scoreboard/assign/set_display/custom_total_name/activation"
]
}

View File

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"fz:module/scoreboard/assign/set_display/custom_total_name/trade_count"
]
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fz:module/scoreboard/assign/set_display/damage_taken"
]
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fz:module/scoreboard/assign/set_display/total_name/activation"
]
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fz:module/scoreboard/assign/set_display/total_name/aviating_distance"
]
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fz:module/scoreboard/assign/set_display/total_name/damage_taken"
]
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fz:module/scoreboard/assign/set_display/total_name/trade_count"
]
}