No Crop Trample
一个轻量级的、仅服务端的模组,适用于 Fabric 和 NeoForge,可防止玩家和生物将耕地踩踏成泥土。原版客户端无需安装任何内容即可加入服务器;在客户端安装该模组完全可选,并提供本地化的配置界面(支持 10 种语言)。
演示
每项设置关闭与开启时的相同测试对比。
空闲耕地保护仅影响未种植的耕地;已种植的耕地遵循玩家和生物的设置。
功能
- 独立的开关:分别针对玩家、生物和空闲(未种植)耕地。
- 骑乘玩家遵循玩家规则:马、骆驼、猪和其他由玩家控制的坐骑使用玩家规则(包括“轻落”效果)。
- 可选的生存平衡机制:
- 最低轻落等级 (
0–4) — 要求靴子至少具备该等级的“轻落”效果后,玩家保护才会生效。
- 最大安全下落距离 (
0–100 格,0 = 无限制) — 保持正常跳跃的安全,同时允许高落差仍会踩踏耕地。
- 零刻tick开销 — 基于事件驱动(单个 Fabric Mixin / NeoForge 原生
FarmlandTrampleEvent),无 tick 循环或实体扫描。
- 100% 服务端 — 原版客户端无需安装模组即可加入。
设置工作原理
- 在活动世界中(按世界保存的游戏规则): 每个世界都会将其当前的实时设置保存为原版的 Minecraft 游戏规则(
nocroptrample:*)。可通过 /nocroptrample、/gamerule、Minecraft 的游戏规则屏幕(或在单人游戏中通过模组的配置屏幕)随时更改。不同的世界可以拥有不同的规则。
- 新世界的默认值 (
config/nocroptrample.json): JSON 配置文件设置了新创建世界的初始值——你可以手动编辑它,或通过主菜单进行编辑(Fabric 上通过 ModMenu,NeoForge 上通过 Mods → Config)。要将更新后的 JSON 默认值应用到现有世界,请运行 /nocroptrample reload。
- 多人服务器(可选客户端 GUI): 仅需服务器安装该模组。如果玩家也在其客户端安装了该模组,他们可以在配置界面中看到服务器的实时设置(只读)(当 OP 更改规则时会自动更新),或者在没有安装该模组的服务器上看到清晰的提示信息。
命令与游戏规则
查看状态对所有人开放;更改设置需要 OP 权限等级 2(OP 还可以在使用 /nocroptrample status 时获得可点击的控制选项)。
| 设置项 |
默认值 |
命令 |
游戏规则 (GameRule) |
| 空闲耕地 |
true |
/nocroptrample empty [on|off] |
nocroptrample:prevent_empty_trampling |
| 玩家及坐骑 |
true |
/nocroptrample player [on|off] |
nocroptrample:prevent_player_trampling |
| 生物 |
true |
/nocroptrample mob [on|off] |
nocroptrample:prevent_mob_trampling |
| 最低轻落等级 |
0 (关闭) |
/nocroptrample featherfalling [0-4] |
nocroptrample:min_feather_falling_level |
| 最大安全下落距离 |
0 (无限制) |
/nocroptrample falldistance [0-100] |
nocroptrample:max_safe_fall_distance |
实用命令:
/nocroptrample 或 /nocroptrample status — 显示当前世界的设置(为 OP 提供可点击的切换/步进控件)。
/nocroptrample reload — 重新加载 config/nocroptrample.json 并将这些默认值应用到当前世界。
/nocroptrample reset — 将当前世界的规则重置为模组默认值。
默认配置
config/nocroptrample.json 用于为新创建的世界以及 /nocroptrample reload(现有世界将其自身的覆盖值存储在 GameRules 中)提供种子数据:
{
"preventEmptyTrampling": true,
"preventPlayerTrampling": true,
"preventMobTrampling": true,
"minFeatherFallingLevel": 0,
"maxSafeFallDistance": 0
}
整合包与数据包标签
| 标签 |
路径 |
用途 |
#nocroptrample:protected_crops |
data/nocroptrample/tags/block/protected_crops.json |
被视为已种植作物的额外方块(默认包含 minecraft:torchflower;CropBlock、StemBlock、AttachedStemBlock 和 #minecraft:crops 已自动检测)。 |
#nocroptrample:trample_exempt_entities |
data/nocroptrample/tags/entity_type/trample_exempt_entities.json |
永远不会踩踏耕地的实体。 |
#nocroptrample:always_trample_entities |
data/nocroptrample/tags/entity_type/always_trample_entities.json |
始终会踩踏耕地的实体(优先级高于所有保护规则,包括 trample_exempt_entities)。 |
示例数据包覆盖 (data/nocroptrample/tags/entity_type/always_trample_entities.json):
{
"replace": false,
"values": [
"minecraft:ravager"
]
}
要求
- Minecraft 26.3+
- Fabric Loader 0.16+ 和 Fabric API,或 NeoForge 26.3+
- Java 25+
链接
No Crop Trample
A lightweight, server-side only mod for Fabric and NeoForge that prevents players and mobs from trampling farmland into dirt. Vanilla clients can join servers with nothing installed; installing the mod on the client is completely optional and adds a localized config screen (10 languages).
Demo
The same test with each setting off and on.
|
Off |
On |
| Player |
 |
 |
| Mob |
 |
 |
| Empty farmland |
 |
 |
Empty farmland protection only affects unplanted farmland; planted farmland follows the player and mob settings.
Features
- Independent toggles for players, mobs, and empty (unplanted) farmland.
- Mounted players follow player rules — horses, camels, pigs, and other player-controlled mounts use player rules (including Feather Falling).
- Optional survival balance:
- Min Feather Falling (
0–4) — require boots with at least that Feather Falling level before player protection applies.
- Max Safe Fall Distance (
0–100 blocks, 0 = unlimited) — keep normal jumps safe while letting high falls still trample farmland.
- Zero tick overhead — event-driven (a single Fabric Mixin / NeoForge's native
FarmlandTrampleEvent), no tick loops or entity scanning.
- 100% server-side — vanilla clients join without needing the mod.
How Settings Work
- In an active world (per-world GameRules): Each world saves its own live settings as native Minecraft GameRules (
nocroptrample:*). Change them anytime via /nocroptrample, /gamerule, Minecraft's Game Rules screen, or (in singleplayer) the mod's config screen. Different worlds can have different rules.
- Defaults for new worlds (
config/nocroptrample.json): The JSON config file sets the starting values for newly created worlds — edit it by hand or from the Title Screen (via ModMenu on Fabric, or Mods → Config on NeoForge). To apply updated JSON defaults to an existing world, run /nocroptrample reload.
- Multiplayer servers (optional client GUI): Only the server needs the mod. Players who also install it on their client see the server's live settings (read-only) in the config screen (automatically updated when an OP changes a rule), or a clear notice on servers without the mod.
Commands & GameRules
Viewing status works for everyone; changing settings requires OP permission level 2 (OPs also get clickable controls in /nocroptrample status).
| Setting |
Default |
Command |
GameRule |
| Empty farmland |
true |
/nocroptrample empty [on|off] |
nocroptrample:prevent_empty_trampling |
| Players & mounts |
true |
/nocroptrample player [on|off] |
nocroptrample:prevent_player_trampling |
| Mobs |
true |
/nocroptrample mob [on|off] |
nocroptrample:prevent_mob_trampling |
| Min Feather Falling |
0 (off) |
/nocroptrample featherfalling [0-4] |
nocroptrample:min_feather_falling_level |
| Max safe fall |
0 (unlimited) |
/nocroptrample falldistance [0-100] |
nocroptrample:max_safe_fall_distance |
Utility commands:
/nocroptrample or /nocroptrample status — show current world settings (with clickable toggles/steps for OPs).
/nocroptrample reload — reload config/nocroptrample.json and apply those defaults to the current world.
/nocroptrample reset — reset the current world's rules back to mod defaults.
Default Configuration
config/nocroptrample.json seeds newly created worlds and /nocroptrample reload (existing worlds store their own overrides in GameRules):
{
"preventEmptyTrampling": true,
"preventPlayerTrampling": true,
"preventMobTrampling": true,
"minFeatherFallingLevel": 0,
"maxSafeFallDistance": 0
}
Modpacks & Datapack Tags
| Tag |
Path |
Purpose |
#nocroptrample:protected_crops |
data/nocroptrample/tags/block/protected_crops.json |
Extra blocks treated as planted crops (includes minecraft:torchflower by default; CropBlock, StemBlock, AttachedStemBlock, and #minecraft:crops are already detected automatically). |
#nocroptrample:trample_exempt_entities |
data/nocroptrample/tags/entity_type/trample_exempt_entities.json |
Entities that never trample farmland. |
#nocroptrample:always_trample_entities |
data/nocroptrample/tags/entity_type/always_trample_entities.json |
Entities that always trample farmland (takes priority over all protection rules, including trample_exempt_entities). |
Example datapack override (data/nocroptrample/tags/entity_type/always_trample_entities.json):
{
"replace": false,
"values": [
"minecraft:ravager"
]
}
Requirements
- Minecraft 26.3+
- Fabric Loader 0.16+ and Fabric API, or NeoForge 26.3+
- Java 25+
Links
评论 0
登录后参与评分
还没有评论,来抢沙发吧