增强挖掘榜工具的扩展性、优化here
This commit is contained in:
parent
40ca8db5d5
commit
6fb0d57394
@ -1 +1 @@
|
||||
data modify storage fzsd:global fzsd.api.dimension.name set value '{"nbt": "fzsd.cache.dimension.id", "storage": "fzsd:global"}'
|
||||
data modify storage fzsd:global fzsd.api.dimension.name set value '{"nbt": "fzsd.api.dimension.id", "storage": "fzsd:global"}'
|
@ -30,7 +30,4 @@ scoreboard players operation fzsd.var.score fzsd.variable.integer += @s fzsd.eve
|
||||
scoreboard players operation fzsd.var.score fzsd.variable.integer += @s fzsd.event.used_tool.wooden_pickaxe
|
||||
scoreboard players operation fzsd.var.score fzsd.variable.integer += @s fzsd.event.used_tool.wooden_shovel
|
||||
scoreboard players operation fzsd.var.score fzsd.variable.integer += @s fzsd.event.used_tool.wooden_sword
|
||||
scoreboard players operation fzsd.var.score fzsd.variable.integer += @s fzsd.event.used_tool.dig_offset
|
||||
|
||||
## 判断分数
|
||||
execute unless score fzsd.var.score fzsd.variable.integer matches ..0 run function fzsd:game_event/player/on_broke_block_with_tool
|
||||
scoreboard players operation fzsd.var.score fzsd.variable.integer += @s fzsd.event.used_tool.dig_offset
|
@ -0,0 +1,2 @@
|
||||
## 判断分数
|
||||
execute unless score fzsd.var.score fzsd.variable.integer matches ..0 run function fzsd:game_event/player/on_broke_block_with_tool
|
@ -3,4 +3,5 @@ execute store result storage fzsd:here fzsd.overworld.x int 8 run data get entit
|
||||
execute store result storage fzsd:here fzsd.overworld.z int 8 run data get entity @s Pos[2]
|
||||
data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:overworld"
|
||||
function #fzsd:api/get_dimension_name
|
||||
data modify storage fzsd:here fzsd.message.append set value '[{"text": ",对应", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": "[", "color": "green"}, {"nbt": "fzsd.overworld.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.overworld.z", "storage": "fzsd:here"}, {"text": "]"}]]'
|
||||
data modify storage fzsd:here fzsd.message.append set value '[{"text": ",对应", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": "[", "color": "green"}, {"nbt": "fzsd.overworld.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.overworld.z", "storage": "fzsd:here"}, {"text": "]"}]]'
|
||||
## 恢复用于判断的维度id
|
@ -1 +1 @@
|
||||
execute if data storage fzsd:global fzsd.api.dimension{id:"minecraft:overworld"} run function fzsd:module/here/get_dimension_message/if_overworld
|
||||
execute if data entity @s {Dimension:"minecraft:overworld"} run function fzsd:module/here/get_dimension_message/if_overworld
|
@ -1 +1 @@
|
||||
execute if data storage fzsd:global fzsd.api.dimension{id:"minecraft:the_nether"} run function fzsd:module/here/get_dimension_message/if_the_nether
|
||||
execute if data entity @s {Dimension:"minecraft:the_nether"} run function fzsd:module/here/get_dimension_message/if_the_nether
|
@ -1,8 +1,8 @@
|
||||
## fzsd.cache.pos已在install中初始化
|
||||
|
||||
execute store result storage fzsd:here fzsd.x int 1 run data get entity @s Pos[0]
|
||||
execute store result storage fzsd:here fzsd.y int 1 run data get entity @s Pos[1]
|
||||
execute store result storage fzsd:here fzsd.z int 1 run data get entity @s Pos[2]
|
||||
data modify storage fzsd:here fzsd.message.append set value ''
|
||||
|
||||
data modify storage fzsd:here fzsd.dimension.name set from storage fzsd:global fzsd.api.dimension.name
|
||||
## 调试
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "获取了位置信息"}]
|
@ -1 +1 @@
|
||||
tellraw @a [{"selector": "@s"}, [{"text": "说:我在", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:here"}, {"text": "]"}], {"nbt": "fzsd.message.append", "interpret": true, "storage": "fzsd:here"}]]
|
||||
tellraw @a [{"selector": "@s"}, [{"text": "说:我在", "color": "white"}, {"nbt": "fzsd.dimension.name", "interpret": true, "storage": "fzsd:here"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:here"}, {"text": "]"}], {"nbt": "fzsd.message.append", "interpret": true, "storage": "fzsd:here"}]]
|
@ -1 +1 @@
|
||||
tellraw @s [{"text": "你在", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:here"}, {"text": "]"}], {"nbt": "fzsd.message.append", "interpret": true, "storage": "fzsd:here"}]
|
||||
tellraw @s [{"text": "你在", "color": "white"}, {"nbt": "fzsd.dimension.name", "interpret": true, "storage": "fzsd:here"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:here"}, {"text": "]"}], {"nbt": "fzsd.message.append", "interpret": true, "storage": "fzsd:here"}]
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fzsd:game_event/player/on_broke_block_with_tool/calculate_dig_score"
|
||||
]
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fzsd:game_event/player/on_broke_block_with_tool/on_used_tool"
|
||||
"#fzsd:game_event/player/on_broke_block_with_tool/calculate_dig_score",
|
||||
"fzsd:game_event/player/on_broke_block_with_tool/try_trigger"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user