Skip to content

Commit d0221c0

Browse files
af: ♻️ refactor: 优化数据包横幅和移除多余效果
- 使用 dfl 库的标准化数据包横幅函数替代硬编码的 tellraw 命令 - 移除 tick 函数中的夜视和发光效果,简化核心功能 - 更新作者链接到 Modrinth 个人页面
1 parent 916abe8 commit d0221c0

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
tellraw @a "--------------------"
2-
tellraw @a "| Anvil Falling 数据包加载成功"
3-
tellraw @a [{"text": "| "},{"text":"by white_elephant_","color":"blue","underlined":true,"italic":true,"clickEvent":{"action":"open_url","value":"https://space.bilibili.com/1836643444"}}]
4-
tellraw @a "| "
5-
tellraw @a [{"text": "| "},{"text": "本数据包使用 ","bold": true},{"text":"GNU GPL","color":"blue","underlined":true,"italic":true,"clickEvent":{"action":"open_url","value":"https://www.gnu.org/licenses/gpl-3.0.txt"}},{"text": " 协议开源","bold": true}]
6-
tellraw @a "--------------------"
7-
gamerule keepInventory true
1+
function dfl:lib/datapack_banner {\
2+
name:"Anvil Falling",\
3+
author:"white_elephant_",\
4+
author_url:"https://modrinth.com/user/white_elephant",\
5+
license_name:"GNU GPL",\
6+
license_url:"https://www.gnu.org/licenses/gpl-3.0.txt",\
7+
official_url:"https://github.com/WhiteElephant-abc/E1epack/tree/main/anvil-falling"}
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
effect give @a minecraft:night_vision
2-
effect give @a minecraft:glowing
3-
4-
51
execute at @a[gamemode=survival] if dimension minecraft:overworld run setblock ~ ~100 ~ minecraft:anvil
62
execute at @e[nbt={BlockState:{Name:"minecraft:anvil"}}] if dimension minecraft:overworld run fill ~ ~ ~ ~ ~-2 ~ air replace minecraft:stone
73
execute at @e[nbt={BlockState:{Name:"minecraft:anvil"}}] if dimension minecraft:overworld run fill ~ ~ ~ ~ ~-2 ~ air replace minecraft:grass_block
@@ -14,4 +10,4 @@ execute at @e[nbt={BlockState:{Name:"minecraft:anvil"}}] if dimension minecraft:
1410
execute at @a[gamemode=survival] if dimension minecraft:the_end run setblock ~ ~100 ~ minecraft:anvil
1511
execute at @a if dimension minecraft:the_end run fill ~10 ~10 ~10 ~-10 ~-10 ~-10 minecraft:air replace minecraft:anvil
1612
execute at @a if dimension minecraft:the_end run fill ~10 ~10 ~10 ~-10 ~-10 ~-10 minecraft:air replace minecraft:chipped_anvil
17-
execute at @a if dimension minecraft:the_end run fill ~10 ~10 ~10 ~-10 ~-10 ~-10 minecraft:air replace minecraft:damaged_anvil
13+
execute at @a if dimension minecraft:the_end run fill ~10 ~10 ~10 ~-10 ~-10 ~-10 minecraft:air replace minecraft:damaged_anvil

0 commit comments

Comments
 (0)