Always Drop Loot
Always Drop Loot 的非官方延续版本,适用于 Fabric、Forge 和 NeoForge。
在原版 Minecraft 中,由摔落、岩浆、窒息、营火、溺水、实体拥挤以及其他非玩家原因导致的生物死亡,可能会丢失经验值或依赖“玩家击杀”条件才掉落的战利品。本模组使该行为可配置,以便被动农场和自动化系统能够获得预期的掉落物。
版本兼容性
每个支持的加载器/系列组合都作为单个运行时 JAR 分发。例如,Forge 1.21 的 JAR 声明兼容整个 1.21.x 系列;无需为每个补丁版本提供单独的 JAR。
| Minecraft 系列 |
Fabric |
Forge |
NeoForge |
| 1.16.x |
不可用 |
不可用 |
不可用 |
| 1.17.x |
不可用 |
不可用 |
不可用 |
| 1.18.x |
不可用 |
不可用 |
不可用 |
| 1.19.x |
不可用 |
不可用 |
不可用 |
| 1.20.x |
1.20–1.20.6 |
1.20–1.20.6 |
1.20.1–1.20.6 |
| 1.21.x |
1.21–1.21.11 |
1.21–1.21.11 |
1.21–1.21.11 |
| 26.1.x |
>=26.1 <26.2 |
>=26.1 <26.2 |
>=26.1 <26.2 |
| 26.2.x |
>=26.2 <26.3 |
>=26.2 <26.3 |
>=26.2 <26.3 |
| 26.3.x |
>=26.3 <26.4 |
>=26.3 <26.4 |
>=26.3 <26.4 |
Not available(不可用)表示此仓库未提供该系列的模组构建。1.20 系列的 NeoForge 支持从 1.20.1 开始。
上述范围是每个构件声明的兼容性范围。每个项目在每个系列中使用一个代表性的 Minecraft 版本,如下所示。
项目矩阵
| Loader |
Series |
Build target |
Loader/API target |
Java bytecode / target runtime |
| Fabric |
1.20 |
1.20.6 |
Loader 0.16.10 / API 0.100.8 |
17 / 版本相关 |
| Fabric |
1.21 |
1.21 |
Loader 0.15.11 / API 0.100.4 |
21 / 21 |
| Fabric |
26.1 |
26.1 |
Loader 0.18.4 / API 0.144.0 |
22 / 25 |
| Fabric |
26.2 |
26.2 |
Loader 0.19.3 / API 0.154.2 |
25 / 25 |
| Fabric |
26.3 |
26.3 |
Loader 0.19.5 / API 0.160.6 |
25 / 25 |
| Forge |
1.20 |
1.20.6 |
Forge 50.2.10 |
17 / 版本相关 |
| Forge |
1.21 |
1.21 |
Forge 51.0.33 |
21 |
| Forge |
26.1 |
26.1 |
Forge 62.0.2 |
25 |
| Forge |
26.2 |
26.2 |
Forge 65.1.1 |
25 |
| Forge |
26.3 |
26.3 |
Forge 66.0.2 |
25 |
| NeoForge |
1.20 |
1.20.6 |
NeoForge 20.6.139 |
17 / 版本相关 |
| NeoForge |
1.21 |
1.21 |
NeoForge 21.0.167 |
21 |
| NeoForge |
26.1 |
26.1.2 |
NeoForge 26.1.2.95 |
25 |
| NeoForge |
26.2 |
26.2 |
NeoForge 26.2.0.59 |
25 |
| NeoForge |
26.3 |
26.3 |
NeoForge 26.3.0.3-beta |
25 |
Minecraft 26.3 目前仅有 Fabric 和 NeoForge 项目。NeoForge 26.3.0.3-beta 是一个测试版加载器。两个构建均已通过针对被动经验值、战利品模式、装备掉落和游戏规则持久性的专用开发服务器检查。尚未测试客户端和整合包兼容性。
安装
- 为你的 Minecraft 版本安装 Fabric Loader。
- 为相同版本安装 Fabric API。
- 将模组 JAR 放入你的
mods 文件夹。
- 启动游戏或服务器。
本模组在实际使用中属于服务端模组,因此在单人游戏和专用服务器上均有用处。
配置
本模组使用游戏规则进行配置。由于游戏规则是特定于世界的,因此每个存档或服务器可以有不同的行为。
如果在单人世界中禁用了作弊,你可以通过开启带有作弊权限的局域网世界来临时启用对游戏规则的访问。
always-drop-loot:always_drop_xp
控制生物在没有被玩家击杀的情况下死亡时是否可能掉落经验值。
默认值:
/gamerule always-drop-loot:always_drop_xp true
行为:
true: 当死亡由环境因素或自动化引起时,生物仍可掉落经验值。
false: 遵循原版经验值行为。
always-drop-loot:passive_xp_modifier
控制没有玩家击杀参与时生物死亡的倍率。
默认值:
/gamerule always-drop-loot:passive_xp_modifier 1.0
行为:
1.0: 非玩家击杀掉落生物正常的经验值数量。
0.5: 非玩家击杀掉落一半经验值。
0.0: 非玩家击杀不掉落经验值。
2.0: 非玩家击杀掉落双倍经验值。
此值仅影响未被归因于玩家的死亡。它不会改变正常的玩家击杀经验值。
always-drop-loot:loot_drop_mode
控制战利品表如何解释 killed_by_player 条件。
默认值:
/gamerule always-drop-loot:loot_drop_mode ALWAYS_AS_PLAYER
可用值:
ALWAYS_AS_PLAYER: 始终将生物视为被玩家击杀。
NEVER_AS_PLAYER: 从不将生物视为被玩家击杀。
VANILLA: 使用正常的原版行为。
VANILLA_INVERSE: 反转原版行为。
此规则影响依赖于 killed_by_player 的战利品表掉落。
示例设置
让自动化农场始终掉落正常经验值和战利品:
/gamerule always-drop-loot:always_drop_xp true
/gamerule always-drop-loot:passive_xp_modifier 1.0
/gamerule always-drop-loot:loot_drop_mode ALWAYS_AS_PLAYER
允许农场掉落战利品,但降低自动击杀的 XP 获取量:
/gamerule always-drop-loot:always_drop_xp true
/gamerule always-drop-loot:passive_xp_modifier 0.5
/gamerule always-drop-loot:loot_drop_mode ALWAYS_AS_PLAYER
保留原版战利品逻辑,但仍允许从被动农场获得部分 XP:
/gamerule always-drop-loot:always_drop_xp true
/gamerule always-drop-loot:passive_xp_modifier 0.5
/gamerule always-drop-loot:loot_drop_mode VANILLA
致谢
本模组的原始概念、实现及开源发布的全部功劳归属于 sargunv。
此更新分支旨在让该模组在更新的 Fabric 1.21.x 版本中继续可用,同时尽可能保留原始的设计理念和行为。
许可证
本分支继续遵守原项目的 Apache-2.0 许可证。
Always Drop Loot
Unofficial continuation of Always Drop Loot for Fabric, Forge, and NeoForge.
In vanilla Minecraft, mobs killed by falls, lava, suffocation, campfires, drowning, entity cramming, and other non-player causes may lose experience or loot that depends on a player kill. This mod makes that behavior configurable so passive farms and automated systems can receive the expected drops.
Version compatibility
Each supported loader/series combination is distributed as one runtime JAR. For example, the Forge 1.21 JAR declares compatibility with the whole 1.21.x series; a separate JAR is not required for every patch release.
| Minecraft series |
Fabric |
Forge |
NeoForge |
| 1.16.x |
Not available |
Not available |
Not available |
| 1.17.x |
Not available |
Not available |
Not available |
| 1.18.x |
Not available |
Not available |
Not available |
| 1.19.x |
Not available |
Not available |
Not available |
| 1.20.x |
1.20–1.20.6 |
1.20–1.20.6 |
1.20.1–1.20.6 |
| 1.21.x |
1.21–1.21.11 |
1.21–1.21.11 |
1.21–1.21.11 |
| 26.1.x |
>=26.1 <26.2 |
>=26.1 <26.2 |
>=26.1 <26.2 |
| 26.2.x |
>=26.2 <26.3 |
>=26.2 <26.3 |
>=26.2 <26.3 |
| 26.3.x |
>=26.3 <26.4 |
>=26.3 <26.4 |
>=26.3 <26.4 |
Not available means that this repository does not provide a mod build for that series. NeoForge support in the 1.20 line starts at 1.20.1.
The ranges above are the compatibility ranges declared by each artifact. Each project uses one representative Minecraft version per series, listed below.
Project matrix
| Loader |
Series |
Build target |
Loader/API target |
Java bytecode / target runtime |
| Fabric |
1.20 |
1.20.6 |
Loader 0.16.10 / API 0.100.8 |
17 / version-dependent |
| Fabric |
1.21 |
1.21 |
Loader 0.15.11 / API 0.100.4 |
21 / 21 |
| Fabric |
26.1 |
26.1 |
Loader 0.18.4 / API 0.144.0 |
22 / 25 |
| Fabric |
26.2 |
26.2 |
Loader 0.19.3 / API 0.154.2 |
25 / 25 |
| Fabric |
26.3 |
26.3 |
Loader 0.19.5 / API 0.160.6 |
25 / 25 |
| Forge |
1.20 |
1.20.6 |
Forge 50.2.10 |
17 / version-dependent |
| Forge |
1.21 |
1.21 |
Forge 51.0.33 |
21 |
| Forge |
26.1 |
26.1 |
Forge 62.0.2 |
25 |
| Forge |
26.2 |
26.2 |
Forge 65.1.1 |
25 |
| Forge |
26.3 |
26.3 |
Forge 66.0.2 |
25 |
| NeoForge |
1.20 |
1.20.6 |
NeoForge 20.6.139 |
17 / version-dependent |
| NeoForge |
1.21 |
1.21 |
NeoForge 21.0.167 |
21 |
| NeoForge |
26.1 |
26.1.2 |
NeoForge 26.1.2.95 |
25 |
| NeoForge |
26.2 |
26.2 |
NeoForge 26.2.0.59 |
25 |
| NeoForge |
26.3 |
26.3 |
NeoForge 26.3.0.3-beta |
25 |
Minecraft 26.3 currently has Fabric and NeoForge projects only. NeoForge 26.3.0.3-beta is a beta loader. Both builds passed dedicated development server checks for passive XP, loot modes, equipment drops and gamerule persistence. Client and modpack compatibility have not been tested.
Installation
- Install Fabric Loader for your Minecraft version.
- Install Fabric API for the same version.
- Put the mod jar in your
mods folder.
- Start the game or server.
This mod is server-side in practice, so it is useful both in singleplayer and on dedicated servers.
Configuration
The mod is configured with gamerules. Because they are world-specific, each save or server can have different behavior.
If cheats are disabled in a singleplayer world, you can temporarily enable access to gamerules by opening the world to LAN with cheats enabled.
always-drop-loot:always_drop_xp
Controls whether mobs may drop XP when they die without being killed by a player.
Default:
/gamerule always-drop-loot:always_drop_xp true
Behavior:
true: mobs can still drop XP when death happens by environment or automation.
false: vanilla-style XP behavior.
always-drop-loot:passive_xp_modifier
Controls the XP multiplier for mobs that die without a player kill.
Default:
/gamerule always-drop-loot:passive_xp_modifier 1.0
Behavior:
1.0: non-player kills drop the mob's normal XP amount.
0.5: non-player kills drop half XP.
0.0: non-player kills drop no XP.
2.0: non-player kills drop double XP.
This value only affects deaths that were not credited to a player. It does not change normal player-kill XP.
always-drop-loot:loot_drop_mode
Controls how loot tables interpret the killed_by_player condition.
Default:
/gamerule always-drop-loot:loot_drop_mode ALWAYS_AS_PLAYER
Available values:
ALWAYS_AS_PLAYER: always treat the mob as if a player killed it.
NEVER_AS_PLAYER: never treat the mob as a player kill.
VANILLA: use normal vanilla behavior.
VANILLA_INVERSE: invert vanilla behavior.
This rule is what affects loot-table based drops that depend on killed_by_player.
Example setups
Always drop normal XP and loot from automated farms:
/gamerule always-drop-loot:always_drop_xp true
/gamerule always-drop-loot:passive_xp_modifier 1.0
/gamerule always-drop-loot:loot_drop_mode ALWAYS_AS_PLAYER
Allow loot from farms, but reduce XP from automated kills:
/gamerule always-drop-loot:always_drop_xp true
/gamerule always-drop-loot:passive_xp_modifier 0.5
/gamerule always-drop-loot:loot_drop_mode ALWAYS_AS_PLAYER
Keep vanilla loot logic, but still allow some XP from passive farms:
/gamerule always-drop-loot:always_drop_xp true
/gamerule always-drop-loot:passive_xp_modifier 0.5
/gamerule always-drop-loot:loot_drop_mode VANILLA
Credits
Full credit for the original mod concept, implementation, and open-source release goes to sargunv.
- Original author profile:
- Original mod page:
This updated fork exists to keep the mod usable on newer Fabric 1.21.x versions while preserving the original idea and behavior as closely as possible.
License
This fork continues to respect the original project's Apache-2.0 license.
评论 0
登录后参与评分
还没有评论,来抢沙发吧