Preface
This datapack is licensed under the GNU LESSER GENERAL PUBLIC LICENSE.
This datapack provides developers with some practical functions (and some dialogs), compatible with all versions of Minecraft (except for versions that cannot install datapacks).
However, due to the large number of commands involved in the datapack, lower versions may not be able to use all functions. The applicable versions of all functions will not be specified below.
Please install the resource pack at the same time to use localized content (v3.2+). Otherwise, the datapack language will default to zh_cn.
The mod version of this datapack is packaged through Modrinth, and the content is exactly the same as the datapack version, but it is not necessarily the latest version. Please try to use the datapack version.
This datapack provides a dfl:dfl_enable function, which sets the score of the player dfl_enable in the dfl_scoreboard scoreboard item to 1, which is convenient for datapacks or mods that depend on this datapack to detect whether this datapack is loaded.
Example:
#Execute when the datapack is loaded:
scoreboard objectives add dfl_scoreboard dummy
scoreboard players set dfl_enable dfl_scoreboard 0
#If not loaded:
function dfl:dfl_enable
execute unless score dfl_enable dfl_scoreboard matches 1
#If loaded:
function dfl:dfl_enable
execute if score dfl_enable dfl_scoreboard matches 1
Note: Some functions have "prerequisite functions" attached to their usage. These functions must be executed once before executing them.
Some function usages are followed by {xx:"xx"}. These functions are macro functions. When using them, you need to pass parameters through {<parameter name>:"<content>"} (the parameters in the usage are the recommended parameters tested by the author during development, or the parameters used by the author for testing). The parameter name (such as num) is expressed as: {num} in the text. The parameter format can refer to the function usage, and special formats will be explained.
If you encounter any problems, please click here to give feedback.
Function Description
Start
Functions in this category are recommended to be executed when the datapack is loaded (reloaded).
Disable Special Damage
Function usage: /function dfl:start/disable_special_damage
- Fall damage;
- Fire damage;
- Freeze damage;
- Drowning damage.
Fix the respawn point to 0 0
Function usage: /function dfl:start/set_world_spawn
- Set the world respawn point to 0 0 0;
- Set the respawn point radius to 0;
- At this time, the player will be fixed to respawn on the highest block at coordinate 0 0.
Enable death leaderboard
Function usage: /function dfl:start/show/enable_death_scoreboard
- Create a scoreboard item named death;
- The number of deaths will be displayed on the right side of the screen;
- The number of player deaths is sorted from high to low;
- Note: The death leaderboard will not be displayed when it is first enabled, and it will be displayed only after any player dies.
Display player health
Function usage: /function dfl:start/show/display_health_below_name
- Create a scoreboard item named health;
- The player's health will be displayed below the player's ID;
- It will not be displayed if the distance is slightly far (only the player's ID is displayed);
- Note: When it is first enabled, the health will be displayed as 0, and it will be displayed only after the value is updated (such as being injured).
Display player experience level
Function usage: /function dfl:start/show/display_level_in_tab
- Create a scoreboard item named level;
- The experience level of each player will be displayed in the Tab bar (player list bar);
- Note: When it is first enabled, the experience level will be displayed as 0, and it will be displayed only after the value is updated (such as leveling up).
Display player health bar
Function usage: /function dfl:start/show/display_health_in_tab
- Create a scoreboard item named health;
- The health bar of each player will be displayed in the Tab bar (player list bar).
- The effect is as follows:
![[DFL] Datapack Function Support Library (datapack function library)-Image 1](https://raw.githubusercontent.com/TouchController/E1epack/main/subprojects/datapack-function-library/README/Scoreboard_Display_List_Hearts.gif)
Quickly create a new team
Function usage: /function dfl:start/create_teams {team_blue:"blue",team_red:"red",prefix_blue:"blue",prefix_red:"red"}
- Create two teams named {team_blue} and {team_red};
- The colors are blue and red respectively;
- Disable friendly fire for players in the same team;
- Players can only collide with entities not on the same team;
- The player name prefixes are {prefixblue} and {prefixred} respectively.
Tick
Functions in this category are recommended to be executed every Tick.
Soft ban player
Function usage: /function dfl:tick/soft_ban_player {title:"Ban Reason",subtitle:"Note"}
- Note: The executor of this function must be the player to be banned, you can use the
/executecommand; - Realize a soft ban by continuously tp the player to 0 0 0, setting the mode to adventure, and continuously giving the player negative buffs;
- Must be executed every Tick;
- Title is {title}, subtitle is {subtitle};
- Example:
/execute as @a[tag=ban] run function dfl:tick/soft_ban_player {title:"Ban Reason",subtitle:"Note"}.
The effect is as follows:
![[DFL] Datapack Function Support Library (datapack function library)-Image 2](https://raw.githubusercontent.com/TouchController/E1epack/main/subprojects/datapack-function-library/README/tick.ban.png)
Beacon elytra take-off
Function usage: /function dfl:tick/beacon_fly
- When there are iron blocks, gold blocks, emerald blocks, diamond blocks or netherite blocks under the beacon, the player will be teleported upwards (spectators will not be teleported);
- The heights are 20, 40, 60, 80, and 100 blocks in order;
- The same blocks can be stacked to increase the height (the highest is 400 blocks, using four netherite blocks). If the blocks are different, the block closest to the beacon will be used.
One-click negative Buff
Function usage: /function dfl:tick/apply_debuffs
Give the function executor the following Debuffs:
- slowness
- mining_fatigue
- nausea
- darkness
- hunger
- weakness
- poison
- unluck
- trial_omen
Iron block elevator
Function usage: /function dfl:tick/iron_block_elevator
- Teleport the player upwards when standing between two iron blocks, one above the other;
- The maximum teleportation distance is 6 blocks, that is, the maximum distance between two iron blocks is 5 blocks;
- Will not teleport spectators;
- Will teleport creatures and non-creature entities.
Clear entities if there are too many
Function usage: /function dfl:tick/kill_excess_entities {num:"1000"}
- Clear all non-player entities when the number of non-player entities is greater than {num};
- Will not clear entities with the need tag;
- Entities with the need tag will not be counted in the number of entities here;
- Create a scoreboard item named dfl_scoreboard.
- After execution, a prompt will be displayed in the chat bar, the effect is as follows:
![[DFL] Datapack Function Support Library (datapack function library)-Image 3](https://raw.githubusercontent.com/TouchController/E1epack/main/subprojects/datapack-function-library/README/tick.kill.png)
Clear entities if the entity density is too high
Function usage: /function dfl:tick/kill_by_density {num:"50"}
Prerequisite function: /function dfl:lib/get_entity_density
- Make all entities clear these entities when the number of entities within 10 blocks is greater than {num};
- Will not kill players;
- Will not kill villagers;
- Will not kill entities with the need tag;
- Will not leave traces in the chat bar.
Minecraft is too hard
Function usage: /function dfl:tick/mith
- Enable keep inventory on death;
- Give the executor night vision;
- Give the executor glowing;
- Remove the executor's darkness effect.
Display the number of entities
Function usage: /function dfl:tick/display_entity_count
Prerequisite function: /function dfl:lib/get_entity_count
- Display the real-time number of entities in the player's action bar (above the shortcut bar).
- The effect is as follows:
![[DFL] Datapack Function Support Library (datapack function library)-Image 4](https://raw.githubusercontent.com/TouchController/E1epack/main/subprojects/datapack-function-library/README/tick.show_entity.png)
Disable player friendly fire and collision
Function usage: /function dfl:tick/disable_friendly_fire
- Add a team named dfl and add all players to this team;
- Note: Since the same entity cannot join multiple teams, please do not enable this function if you want to use the player team function;
- Disable team friendly fire;
- Disable collision within the team;
- If this function is not run every Tick, please make sure to run this function once after each new player joins.
Clear TNT if the TNT entity density is too high
Function usage: /function dfl:tick/kill_tnt_by_density {num:"200"}
- Clear these TNT entities when the number of TNT entities within five blocks of the TNT is greater than {num};
- Create a scoreboard item named dfl_tntdensity.
Suicide for players without permission
Function usage: /function dfl:tick/trigger_suicide
- Create a scoreboard item named kill;
- Enter
/trigger killto commit suicide (this command does not require any permission).
Replace blocks in a large area
Function usage: /function dfl:tick/change_block {new:"glass",old:"stone",num:"30"}
- Replace {old} with {new} in a cube with a side length of {num}*2+1 centered on the command executor;
- Change the game rule max_block_modifications to 2147483647.
Always day + always sunny
Function usage: /function dfl:tick/always_sunny
- Turn off the day-night cycle;
- Turn off weather changes;
- Set the time to day;
- Set the weather to clear.
Clear a single item and execute a command
Function usage: /function dfl:tick/clear_and_execute_single {namespace:"minecraft",name:"stone",run:"tp ~ 100 ~"}
- Clear one {namespace}:{name} from all players and execute {run};
- Note: There should be no extra spaces at the beginning and end of the command in the run parameter, and there should be no slash before the command.
Clear specified items and execute commands multiple times
Function usage: /function dfl:tick/clear_and_execute_multiple {namespace:"minecraft",name:"sand",run:"give @s anvil"}
- Clear all {namespace}:{name} of the function executor and execute the corresponding number of {run} (within the same tick);
- Note: There should be no extra spaces at the beginning and end of the command in the run parameter, and there should be no slash before the command.
Keep having an item
Function usage: /function dfl:tick/maintain_item_count {namespace:"minecraft",name:"slime_block",num:"64"}
- Let the command executor have exactly the specified number of {namespace}:{name}.
Self-rescue platform
Function usage: /function dfl:tick/create_rescue_platform
Prerequisite function: /function dfl:lib/get_game_time
- Create a scoreboard item named dfl_slime_marker_temp to store the time when the slime platform is generated;
- Generate a 3*3 slime platform under the player with the dfl_slime tag and remove the tag. The slime platform can only cover air blocks;
- The slime blocks at the slime platform position will be cleared after
<slime_time's dfl_scoreboard scoreboard item>ticks; - The dfl_scoreboard scoreboard item of slime_time will be set to 200 when it is not assigned, which is 10s;
- The slime block drops within 2 blocks of the player's position when the platform is generated will be cleared.
Convert items to experience
Function usage: /function dfl:tick/convert_items_to_xp {namespace:"minecraft",name:"tnt",xp:"1"}
- Convert each {namespace}:{name} on the function executor into {xp} experience points.
tpa
Function usage: /function dfl:tick/teleport_request
Prerequisite function: /function dfl:lib/generate_player_id
- Create scoreboard items named tpa and tpa_enable;
- Enter
/trigger tpa set <player's id in the dfl_playerid scoreboard, which can be viewed through Tab>to teleport to the corresponding player; - Enter
/trigger tpa_enableto allow other players to teleport to themselves, which cannot be revoked (if this command is not executed, all other players cannot teleport to this player). If set is used in this command to set other values, there will be no effect (other players will not be allowed to teleport to themselves). You can still set it to 1 again through set to allow other players to teleport to themselves; - If the player to be teleported does not exist or has not allowed other players to teleport to themselves, they will be teleported to the corresponding player after the corresponding player id can be teleported. During this period, the tpa object can still be changed at will.
Auto-smelting
Function usage: /function dfl:tick/smelt_item {input_namespace:"minecraft",input:"raw_iron",fuel_namespace:"minecraft",fuel:"coal_block",output:"iron_ingot",amount:"9"}
- Consume one {fuel_namespace}:{fuel} and multiple {input_namespace}:{input};
- Give the function executor the corresponding amount of {output} for {input_namespace}:{input};
- {input} cannot contain
:, {output} can; - Smelting an item consumes 1 experience point. If the player has no experience, the item will not be smelted;
- {amount} indicates the number of items that one {fuel_namespace}:{fuel} can smelt.
Auto-smelting using fuel
Function usage: /function dfl:tick/coal_smelt {input_namespace:"minecraft",input:"raw_iron",output:"iron_ingot"}
- Consume {input_namespace}:{input} and give the function executor the corresponding amount of {output};
- Smelting an item consumes 1 experience point. If the player has no experience, the item will not be smelted;
- If the backpack has three supported fuels at the same time, these fuels will be consumed at the same time;
- After consuming a coal block, 9 items can be smelted at the same time, and 9 experience points will be deducted.
Timer
Functions in this category are recommended to be executed after a period of time. (You can use the /schedule command)
Clean up dropped items
Function usage: /function dfl:timer/clear_items
- Create a scoreboard item named dfl_scoreboard;
- Clear all dropped items and output the number of cleared dropped items through
/tellraw; - Will not clear dropped items with the need tag.
- The effect is as follows:
![[DFL] Datapack Function Support Library (datapack function library)-Image 5](https://raw.githubusercontent.com/TouchController/E1epack/main/subprojects/datapack-function-library/README/redstone.kill_item.png)
Display entity quantity information
Function usage: /function dfl:timer/display_entity_info
Prerequisite functions:
/function dfl:lib/get_entity_count
/function dfl:lib/get_item_count
/function dfl:lib/non_player_entities
The effect of this function is as follows:
![[DFL] Datapack Function Support Library (datapack function library)-Image 6](https://raw.githubusercontent.com/TouchController/E1epack/main/subprojects/datapack-function-library/README/redstone.show_entity.png)
Lib
Functions in this category have no effect when executed alone or do not fit into the above categories.
Force death drop
Function usage: /function dfl:lib/force_death_drops
- Turn off keep inventory on death.
- Kill the function executor.
- Turn on keep inventory on death.
Get the number of entities
Function usage: /function dfl:lib/get_entity_count
- Create a scoreboard item named dfl_scoreboard;
- Write the number of entities to the dfl_scoreboard scoreboard item of entity.
Get entity density
Function usage: /function dfl:lib/get_entity_density
- Create a scoreboard item named dfl_density;
- Write the number of entities within 10 blocks of all entities to the scoreboard item of this entity.
Get the number of dropped items
Function usage: /function dfl:lib/get_item_count
- Create a scoreboard item named dfl_scoreboard;
- Write the number of dropped items to the dfl_scoreboard scoreboard item of item.
Get the number of non-player entities
Function usage: /function dfl:lib/non_player_entities
- Create a scoreboard item named dfl_scoreboard;
- Write the number of non-player entities to the dfl_scoreboard scoreboard item of other_entity.
Get the number of game days
Function usage: /function dfl:lib/get_game_day
- Create a scoreboard item named dfl_scoreboard;
- Write the number of game days to the dfl_scoreboard scoreboard item of day;
- Game days - the number of game days that have passed during the day-night cycle, which is the result of dividing the day-night cycle time by 24000 and taking the integer quotient.
Get the time of day
Function usage: /function dfl:lib/get_day_time
- Create a scoreboard item named dfl_scoreboard;
- Write the time of day to the dfl_scoreboard scoreboard item of daytime;
- Time of day - the number of game ticks that have passed since sunrise on that day, which is the result of dividing the day-night cycle time by 24000 and taking the remainder.
Surround the player with glass
Function usage: /function dfl:lib/create_glass_box
- Generate a 5*5 hollow glass cube at the command executor.
Get game time
Function usage: /function dfl:lib/get_game_time
- Create a scoreboard item named dfl_scoreboard;
- Write the game time to the dfl_scoreboard scoreboard item of gametime;
- Game time - the total number of game ticks that have passed in the world.
Get the number of players
Function usage: /function dfl:lib/get_player_count
- Create a scoreboard item named dfl_scoreboard;
- Write the number of players to the dfl_scoreboard scoreboard item of players.
Modify maximum health
Function usage: /function dfl:lib/change_max_health {num:"100"}
- Set the maximum health of all players to {num}.
Generate UID
Function usage: /function dfl:lib/generate_player_id
- Create scoreboard items named dfl_playerid and dfl_scoreboard;
- Store the UID usage progress in the dfl_scoreboard scoreboard item of playerid_temp;
- Set a unique and immutable UID for all players in the dfl_playerid scoreboard;
- The UID is a number of 1 and above. The player who enters the server earliest has the smallest number, and so on;
- If there is more than one player in the server when the function is executed, the UID generation order of these players is random.
Detect the number of items
Function usage: /function dfl:lib/count_items {namespace:"minecraft",name:"stone"}
- Create a scoreboard item named dfl_{namespace}.{name}_count;
- Write the number of {namespace}:{name} of all players to their respective scoreboard items.
Get entity position
Function usage: /function dfl:lib/get_pos
- Create scoreboard items named
dfl_entity_pos_x,dfl_entity_pos_yanddfl_entity_pos_zrespectively. - Read the
PosNBT list of the command executor and update the command executor's scores in these scoreboard items. - Use
/execute as @a run function dfl:lib/get_posto write all players' positions into these scoreboard items.
Dialog Description
GNU GPL License Text
Dialog usage: /dialog show dfl:gpl
- This dialog contains the original text of the GNU GPL v3.0 license.
GNU LGPL License Text
Dialog usage: /dialog show dfl:lgpl
- This dialog contains the original text of the GNU LGPL v3.0 license.
All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 | ||||
| 14h ago | 1 |
- 新增:
dfl:lib/get_pos函数,读取命令执行者的位置并写入dfl_entity_pos_x、dfl_entity_pos_y、dfl_entity_pos_z记分项; - 修复:许可协议对话框文本宽度过宽,调整为 400;
- 文档:README 中的红色高亮改用 Markdown 加粗。
- Added:
dfl:lib/get_posfunction, which reads the command executor's position into thedfl_entity_pos_x,dfl_entity_pos_yanddfl_entity_pos_zscoreboard objectives; - Fix: license dialog text width was too wide, now set to 400;
- Docs: red highlights in the README are now Markdown bold.
- 新增:
dfl:lib/get_pos函数,读取命令执行者的位置并写入dfl_entity_pos_x、dfl_entity_pos_y、dfl_entity_pos_z记分项; - 修复:许可协议对话框文本宽度过宽,调整为 400;
- 文档:README 中的红色高亮改用 Markdown 加粗。
- Added:
dfl:lib/get_posfunction, which reads the command executor's position into thedfl_entity_pos_x,dfl_entity_pos_yanddfl_entity_pos_zscoreboard objectives; - Fix: license dialog text width was too wide, now set to 400;
- Docs: red highlights in the README are now Markdown bold.
- 新增:
dfl:lib/get_pos函数,读取命令执行者的位置并写入dfl_entity_pos_x、dfl_entity_pos_y、dfl_entity_pos_z记分项; - 修复:许可协议对话框文本宽度过宽,调整为 400;
- 文档:README 中的红色高亮改用 Markdown 加粗。
- Added:
dfl:lib/get_posfunction, which reads the command executor's position into thedfl_entity_pos_x,dfl_entity_pos_yanddfl_entity_pos_zscoreboard objectives; - Fix: license dialog text width was too wide, now set to 400;
- Docs: red highlights in the README are now Markdown bold.
- 兼容:支持范围由 1.13–1.21.10 扩展至 1.13–26.3;
- 兼容:适配 Minecraft 26.x 的命令语法变更(
gamerule与time query),旧版本由构建系统自动转换; - 破坏性:
dfl:lib/count_items新增{namespace}参数,记分项由dfl_{name}_num改为dfl_{namespace}.{name}_count; - 破坏性:基于
count_items的函数(clear_and_execute_single、clear_and_execute_multiple、maintain_item_count、convert_items_to_xp)同步新增{namespace}参数; - 破坏性:
dfl:child/smelt重命名为dfl:tick/smelt_item,dfl:tick/smelt重命名为dfl:tick/coal_smelt,两者参数均有调整; - 破坏性:移除
dfl:lib/spawn_dummies批量生成假人函数; - 破坏性:移除 tick 入口函数与
minecraft:tick标签; - 修复:
kill_by_density的村民豁免在部分版本下失效; - 修复:
teleport_request的传送目标判定错误; - 修复:冶炼函数中
count_items调用缺少宏前缀导致无法执行。
- Compatibility: supported version range extended from 1.13–1.21.10 to 1.13–26.3;
- Compatibility: adapted to the command syntax changes of Minecraft 26.x (
gameruleandtime query), with older versions converted automatically at build time; - Breaking:
dfl:lib/count_itemsnow takes a{namespace}parameter, and its scoreboard objective changed fromdfl_{name}_numtodfl_{namespace}.{name}_count; - Breaking: functions built on
count_items(clear_and_execute_single,clear_and_execute_multiple,maintain_item_count,convert_items_to_xp) now take a{namespace}parameter as well; - Breaking:
dfl:child/smeltrenamed todfl:tick/smelt_itemanddfl:tick/smeltrenamed todfl:tick/coal_smelt, both with adjusted parameters; - Breaking: removed the
dfl:lib/spawn_dummiesfunction; - Breaking: removed the tick entry point function and the
minecraft:ticktag; - Fix: villager exemption of
kill_by_densitydid not work on some versions; - Fix: wrong teleport target check in
teleport_request; - Fix: missing macro prefix on
count_itemscalls in the smelting functions.
- 兼容:支持范围由 1.13–1.21.10 扩展至 1.13–26.3;
- 兼容:适配 Minecraft 26.x 的命令语法变更(
gamerule与time query),旧版本由构建系统自动转换; - 破坏性:
dfl:lib/count_items新增{namespace}参数,记分项由dfl_{name}_num改为dfl_{namespace}.{name}_count; - 破坏性:基于
count_items的函数(clear_and_execute_single、clear_and_execute_multiple、maintain_item_count、convert_items_to_xp)同步新增{namespace}参数; - 破坏性:
dfl:child/smelt重命名为dfl:tick/smelt_item,dfl:tick/smelt重命名为dfl:tick/coal_smelt,两者参数均有调整; - 破坏性:移除
dfl:lib/spawn_dummies批量生成假人函数; - 破坏性:移除 tick 入口函数与
minecraft:tick标签; - 修复:
kill_by_density的村民豁免在部分版本下失效; - 修复:
teleport_request的传送目标判定错误; - 修复:冶炼函数中
count_items调用缺少宏前缀导致无法执行。
- Compatibility: supported version range extended from 1.13–1.21.10 to 1.13–26.3;
- Compatibility: adapted to the command syntax changes of Minecraft 26.x (
gameruleandtime query), with older versions converted automatically at build time; - Breaking:
dfl:lib/count_itemsnow takes a{namespace}parameter, and its scoreboard objective changed fromdfl_{name}_numtodfl_{namespace}.{name}_count; - Breaking: functions built on
count_items(clear_and_execute_single,clear_and_execute_multiple,maintain_item_count,convert_items_to_xp) now take a{namespace}parameter as well; - Breaking:
dfl:child/smeltrenamed todfl:tick/smelt_itemanddfl:tick/smeltrenamed todfl:tick/coal_smelt, both with adjusted parameters; - Breaking: removed the
dfl:lib/spawn_dummiesfunction; - Breaking: removed the tick entry point function and the
minecraft:ticktag; - Fix: villager exemption of
kill_by_densitydid not work on some versions; - Fix: wrong teleport target check in
teleport_request; - Fix: missing macro prefix on
count_itemscalls in the smelting functions.
- 兼容:支持范围由 1.13–1.21.10 扩展至 1.13–26.3;
- 兼容:适配 Minecraft 26.x 的命令语法变更(
gamerule与time query),旧版本由构建系统自动转换; - 破坏性:
dfl:lib/count_items新增{namespace}参数,记分项由dfl_{name}_num改为dfl_{namespace}.{name}_count; - 破坏性:基于
count_items的函数(clear_and_execute_single、clear_and_execute_multiple、maintain_item_count、convert_items_to_xp)同步新增{namespace}参数; - 破坏性:
dfl:child/smelt重命名为dfl:tick/smelt_item,dfl:tick/smelt重命名为dfl:tick/coal_smelt,两者参数均有调整; - 破坏性:移除
dfl:lib/spawn_dummies批量生成假人函数; - 破坏性:移除 tick 入口函数与
minecraft:tick标签; - 修复:
kill_by_density的村民豁免在部分版本下失效; - 修复:
teleport_request的传送目标判定错误; - 修复:冶炼函数中
count_items调用缺少宏前缀导致无法执行。
- Compatibility: supported version range extended from 1.13–1.21.10 to 1.13–26.3;
- Compatibility: adapted to the command syntax changes of Minecraft 26.x (
gameruleandtime query), with older versions converted automatically at build time; - Breaking:
dfl:lib/count_itemsnow takes a{namespace}parameter, and its scoreboard objective changed fromdfl_{name}_numtodfl_{namespace}.{name}_count; - Breaking: functions built on
count_items(clear_and_execute_single,clear_and_execute_multiple,maintain_item_count,convert_items_to_xp) now take a{namespace}parameter as well; - Breaking:
dfl:child/smeltrenamed todfl:tick/smelt_itemanddfl:tick/smeltrenamed todfl:tick/coal_smelt, both with adjusted parameters; - Breaking: removed the
dfl:lib/spawn_dummiesfunction; - Breaking: removed the tick entry point function and the
minecraft:ticktag; - Fix: villager exemption of
kill_by_densitydid not work on some versions; - Fix: wrong teleport target check in
teleport_request; - Fix: missing macro prefix on
count_itemscalls in the smelting functions.
- 兼容:支持范围由 1.13–1.21.10 扩展至 1.13–26.3;
- 兼容:适配 Minecraft 26.x 的命令语法变更(
gamerule与time query),旧版本由构建系统自动转换; - 破坏性:
dfl:lib/count_items新增{namespace}参数,记分项由dfl_{name}_num改为dfl_{namespace}.{name}_count; - 破坏性:基于
count_items的函数(clear_and_execute_single、clear_and_execute_multiple、maintain_item_count、convert_items_to_xp)同步新增{namespace}参数; - 破坏性:
dfl:child/smelt重命名为dfl:tick/smelt_item,dfl:tick/smelt重命名为dfl:tick/coal_smelt,两者参数均有调整; - 破坏性:移除
dfl:lib/spawn_dummies批量生成假人函数; - 破坏性:移除 tick 入口函数与
minecraft:tick标签; - 修复:
kill_by_density的村民豁免在部分版本下失效; - 修复:
teleport_request的传送目标判定错误; - 修复:冶炼函数中
count_items调用缺少宏前缀导致无法执行。
- Compatibility: supported version range extended from 1.13–1.21.10 to 1.13–26.3;
- Compatibility: adapted to the command syntax changes of Minecraft 26.x (
gameruleandtime query), with older versions converted automatically at build time; - Breaking:
dfl:lib/count_itemsnow takes a{namespace}parameter, and its scoreboard objective changed fromdfl_{name}_numtodfl_{namespace}.{name}_count; - Breaking: functions built on
count_items(clear_and_execute_single,clear_and_execute_multiple,maintain_item_count,convert_items_to_xp) now take a{namespace}parameter as well; - Breaking:
dfl:child/smeltrenamed todfl:tick/smelt_itemanddfl:tick/smeltrenamed todfl:tick/coal_smelt, both with adjusted parameters; - Breaking: removed the
dfl:lib/spawn_dummiesfunction; - Breaking: removed the tick entry point function and the
minecraft:ticktag; - Fix: villager exemption of
kill_by_densitydid not work on some versions; - Fix: wrong teleport target check in
teleport_request; - Fix: missing macro prefix on
count_itemscalls in the smelting functions.
- 兼容:支持范围由 1.13–1.21.10 扩展至 1.13–26.3;
- 兼容:适配 Minecraft 26.x 的命令语法变更(
gamerule与time query),旧版本由构建系统自动转换; - 破坏性:
dfl:lib/count_items新增{namespace}参数,记分项由dfl_{name}_num改为dfl_{namespace}.{name}_count; - 破坏性:基于
count_items的函数(clear_and_execute_single、clear_and_execute_multiple、maintain_item_count、convert_items_to_xp)同步新增{namespace}参数; - 破坏性:
dfl:child/smelt重命名为dfl:tick/smelt_item,dfl:tick/smelt重命名为dfl:tick/coal_smelt,两者参数均有调整; - 破坏性:移除
dfl:lib/spawn_dummies批量生成假人函数; - 破坏性:移除 tick 入口函数与
minecraft:tick标签; - 修复:
kill_by_density的村民豁免在部分版本下失效; - 修复:
teleport_request的传送目标判定错误; - 修复:冶炼函数中
count_items调用缺少宏前缀导致无法执行。
- Compatibility: supported version range extended from 1.13–1.21.10 to 1.13–26.3;
- Compatibility: adapted to the command syntax changes of Minecraft 26.x (
gameruleandtime query), with older versions converted automatically at build time; - Breaking:
dfl:lib/count_itemsnow takes a{namespace}parameter, and its scoreboard objective changed fromdfl_{name}_numtodfl_{namespace}.{name}_count; - Breaking: functions built on
count_items(clear_and_execute_single,clear_and_execute_multiple,maintain_item_count,convert_items_to_xp) now take a{namespace}parameter as well; - Breaking:
dfl:child/smeltrenamed todfl:tick/smelt_itemanddfl:tick/smeltrenamed todfl:tick/coal_smelt, both with adjusted parameters; - Breaking: removed the
dfl:lib/spawn_dummiesfunction; - Breaking: removed the tick entry point function and the
minecraft:ticktag; - Fix: villager exemption of
kill_by_densitydid not work on some versions; - Fix: wrong teleport target check in
teleport_request; - Fix: missing macro prefix on
count_itemscalls in the smelting functions.
- 兼容:支持范围由 1.13–1.21.10 扩展至 1.13–26.3;
- 兼容:适配 Minecraft 26.x 的命令语法变更(
gamerule与time query),旧版本由构建系统自动转换; - 破坏性:
dfl:lib/count_items新增{namespace}参数,记分项由dfl_{name}_num改为dfl_{namespace}.{name}_count; - 破坏性:基于
count_items的函数(clear_and_execute_single、clear_and_execute_multiple、maintain_item_count、convert_items_to_xp)同步新增{namespace}参数; - 破坏性:
dfl:child/smelt重命名为dfl:tick/smelt_item,dfl:tick/smelt重命名为dfl:tick/coal_smelt,两者参数均有调整; - 破坏性:移除
dfl:lib/spawn_dummies批量生成假人函数; - 破坏性:移除 tick 入口函数与
minecraft:tick标签; - 修复:
kill_by_density的村民豁免在部分版本下失效; - 修复:
teleport_request的传送目标判定错误; - 修复:冶炼函数中
count_items调用缺少宏前缀导致无法执行。
- Compatibility: supported version range extended from 1.13–1.21.10 to 1.13–26.3;
- Compatibility: adapted to the command syntax changes of Minecraft 26.x (
gameruleandtime query), with older versions converted automatically at build time; - Breaking:
dfl:lib/count_itemsnow takes a{namespace}parameter, and its scoreboard objective changed fromdfl_{name}_numtodfl_{namespace}.{name}_count; - Breaking: functions built on
count_items(clear_and_execute_single,clear_and_execute_multiple,maintain_item_count,convert_items_to_xp) now take a{namespace}parameter as well; - Breaking:
dfl:child/smeltrenamed todfl:tick/smelt_itemanddfl:tick/smeltrenamed todfl:tick/coal_smelt, both with adjusted parameters; - Breaking: removed the
dfl:lib/spawn_dummiesfunction; - Breaking: removed the tick entry point function and the
minecraft:ticktag; - Fix: villager exemption of
kill_by_densitydid not work on some versions; - Fix: wrong teleport target check in
teleport_request; - Fix: missing macro prefix on
count_itemscalls in the smelting functions.
- 优化:简化清理物品显示命令的JSON结构
- Optimize: Simplified JSON structure for clear items display command
- 重构:将软封禁玩家函数改为参数化宏函数
- 移除:不再使用的本地化键名
- 更新:函数用法支持自定义标题和副标题
- Refactor: Converted soft ban player function to parameterized macro function
- Remove: Unused localization keys
- Update: Function usage now supports custom title and subtitle
- 重构:将 Redstone 分类重命名为 Timer
- 更新:函数路径从 dfl:redstone/ 改为 dfl:timer/
- Refactor: Renamed Redstone category to Timer
- Update: Function paths changed from dfl:redstone/ to dfl:timer/
- 重构:将 Redstone 分类重命名为 Timer
- 更新:函数路径从 dfl:redstone/ 改为 dfl:timer/
- Refactor: Renamed Redstone category to Timer
- Update: Function paths changed from dfl:redstone/ to dfl:timer/
- 修复 kill_by_density 函数语法错误
- Fixed kill_by_density function syntax error
- 修正函数名称引用,确保与 v2.0.0 的重命名保持一致
- 更新的函数引用包括:things_count → count_items、clear_run_b → clear_and_execute_multiple、things_to_xp → convert_items_to_xp、keep_have_things → maintain_item_count
- 修复了 5 个函数文件中的函数调用引用
- 确保数据包内部函数调用的一致性
- Fixed function name references to ensure consistency with v2.0.0 renaming
- Updated function references include: things_count → count_items、clear_run_b → clear_and_execute_multiple、things_to_xp → convert_items_to_xp、keep_have_things → maintain_item_count
- Fixed function call references in 5 function files
- Ensured consistency of internal function calls within the datapack
- 大规模函数重命名,将多个函数名称标准化为更具描述性的英文名称
- 重命名的函数包括:things_count → count_items、fill_outline → create_glass_box、clear → force_death_drops、player_id → generate_player_id、daytime → get_day_time、entity → get_entity_count、entity_density → get_entity_density、day → get_game_day、gametime → get_game_time、item → get_item_count、players → get_player_count、other_entity → non_player_entities、spawn → spawn_dummies、kill_item → clear_items、show_entity → display_entity_info、addteam → create_teams、nodamage → disable_special_damage、setworldspawn → set_world_spawn、health → display_health_below_name、health_list → display_health_in_tab、level → display_level_in_tab、death → enable_death_scoreboard、debuff → apply_debuffs、clear_run_b → clear_and_execute_multiple、clear_run_a → clear_and_execute_single、things_to_xp → convert_items_to_xp、slime → create_rescue_platform、team → disable_friendly_fire、show_entity → display_entity_count、kill_better → kill_by_density、kill → kill_excess_entities、kill_tnt → kill_tnt_by_density、keep_have_things → maintain_item_count、ban → soft_ban_player、tpa → teleport_request、suicide → trigger_suicide
- 改进函数命名规范,使函数功能更加清晰易懂
- 保持函数功能不变,仅优化命名以提高代码可读性
- Large-scale function renaming, standardizing multiple function names to more descriptive English names
- Renamed functions include: things_count → count_items、fill_outline → create_glass_box、clear → force_death_drops、player_id → generate_player_id、daytime → get_day_time、entity → get_entity_count、entity_density → get_entity_density、day → get_game_day、gametime → get_game_time、item → get_item_count、players → get_player_count、other_entity → non_player_entities、spawn → spawn_dummies、kill_item → clear_items、show_entity → display_entity_info、addteam → create_teams、nodamage → disable_special_damage、setworldspawn → set_world_spawn、health → display_health_below_name、health_list → display_health_in_tab、level → display_level_in_tab、death → enable_death_scoreboard、debuff → apply_debuffs、clear_run_b → clear_and_execute_multiple、clear_run_a → clear_and_execute_single、things_to_xp → convert_items_to_xp、slime → create_rescue_platform、team → disable_friendly_fire、show_entity → display_entity_count、kill_better → kill_by_density、kill → kill_excess_entities、kill_tnt → kill_tnt_by_density、keep_have_things → maintain_item_count、ban → soft_ban_player、tpa → teleport_request、suicide → trigger_suicide
- Improved function naming conventions to make function purposes clearer and more understandable
- Maintained function functionality unchanged, only optimized naming to improve code readability
- 重构自动冶炼函数,使用子函数提高代码可读性和可维护性
- 为所有函数文件添加详细注释和格式化,提升代码质量
- 优化函数结构,改进代码组织
- Refactored auto smelting function using sub-functions for improved code readability and maintainability
- Added detailed comments and formatting to all function files, enhancing code quality
- Optimized function structure and improved code organization
- 现在 dfl:dfl_enable 函数会使用 dfl_scoreboard 记分板而不是 dfl_enable
- 更新了 README
- 现在数据包版本号使用 SemVer 标准,并重置为 1.0.0
- Now the
dfl:dfl_enablefunction uses thedfl_scoreboardscoreboard instead ofdfl_enable - Updated README
- The data pack version now uses the SemVer standard and has been reset to 1.0.0
- 现在 dfl:dfl_enable 函数会使用 dfl_scoreboard 记分板而不是 dfl_enable
- 更新了 README
- 现在数据包版本号使用 SemVer 标准,并重置为 1.0.0
- Now the
dfl:dfl_enablefunction uses thedfl_scoreboardscoreboard instead ofdfl_enable - Updated README
- The data pack version now uses the SemVer standard and has been reset to 1.0.0
- 重命名 dfl:tick/relax 为 dfl:tick/mith
- 现在 dfl:tick/mith 函数除死亡不掉落外,均仅对执行者生效
- Renamed dfl:tick/relax to dfl:tick/mith
- The dfl:tick/mith function now only affects the executor, except for keep inventory on death
- 重命名 dfl:tick/relax 为 dfl:tick/mith
- 现在 dfl:tick/mith 函数除死亡不掉落外,均仅对执行者生效
- Renamed dfl:tick/relax to dfl:tick/mith
- The dfl:tick/mith function now only affects the executor, except for keep inventory on death
- 加入 gpl 和 lgpl 协议原文对话框
- 项目更名
- 杂项
- Added original GPL and LGPL license text dialogs
- Project renamed
- Miscellaneous
- Changed the direct modification of player experience in dfl:tick/things_to_xp to spawning experience orbs
- 将英文 README 中的插图替换为 GitHub 链接
### fix
- 修复了 dfl:tick/kill 函数
### change
- Replace the illustrations in the English README with GitHub links
### fix
- Fixed the dfl:tick/kill function
- 将英文 README 中的插图替换为 GitHub 链接
### fix
- 修复了 dfl:tick/kill 函数
### change
- Replace the illustrations in the English README with GitHub links
### fix
- Fixed the dfl:tick/kill function
- Complete punctuation in README
- Retranslate English README
### fix
- Fix version inconsistency issue in dfl:redstone/kill_item function
- Update README.
### fix
- Fix the issue where links displayed by the dfl:tick/kill function could not be clicked in higher versions.
- No longer adds the dfl enable detection scoreboard every tick; other datapacks can call it when needed.
- Updated README.
- Optimized the dfl:tick/slime function.
- Added dfl:lib/spawn function.
### change
- Updated README.
- Localized dfl:tick/kill function.
- Optimized datapack reload prompt.
- Updated datapack description.
- Updated open-source license to LGPL.
### fix
- Fixed the bug where dfl:tick/kill function did not display the number of killed entities.
- Fixed hyperlinks in higher versions.
- Added the function
dfl:tick/smelt. - Added documentation files.
### Change
- Modified the description in
pack.mcmeta. - Localization.