Skip to content

👟 耕地韧性与防践踏保护机制

在原版 Minecraft 中,耕地脆弱如玻璃——轻微跳跃或跑步掠过就会将耕地破坏回粗糙泥土并毁坏作物。Agrarian Reform 实现了土壤弹性机制,结合逼真的踏踩物理、赤足极速判断和精细的玩家/宠物实体过滤,将耕地转变为值得呵护的宝贵资源。


📊 防踩踏机制信息框

PropertySpecification
Mixin Handlernet.instantgratification.agrarianreform.mixin.FarmlandBlockMixin
Logic Helpernet.instantgratification.agrarianreform.util.GrowthHelper
Soft Step Tags#agrarian_reform:soft_step_boots, #c:boots/soft, minecraft:leather_boots
轻盈步态附魔脚部装备具有摔落保护 (minecraft:feather_falling) 附魔
Fall Distance Limit$\le 0.6\text{ meters}$
实体过滤规则agrarian_reform:trample_immunity_players_only(默认:false
完全免疫规则agrarian_reform:total_trample_immunity(默认:false

👟 柔步保护与判定规则

                       ENTITY FALLS / STEPS ON FARMLAND


                    Is totalTrampleImmunity GameRule true?
                                  ┌────┴────┐
                               YES│         │NO
                                  ▼         ▼
                  Is trampleImmunityPlayersOnly true?  Bare-foot Fast-Fail Check
                                  ┌────┴────┐          (Feet slot empty -> skip enchant lookup)
                               YES│         │NO                     │
                                  ▼         ▼                       ▼
                         Is Player / Tamed? Cancel Trample   Does entity have Soft Step?
                         ┌────────┴────────┐(Farmland Safe)  (#soft_step_boots or Feather Falling)
                      YES│                 │NO                      ┌───────┴───────┐
                         ▼                 ▼                     YES│               │NO
                   Cancel Trample     Normal Trample Logic          ▼               ▼
                   (Farmland Safe)    (Checks Soft Step/Fall) Cancel Trample  Did fall distance
                                                              (Farmland Safe) exceed 0.6m limit?
                                                                                ┌───┴───┐
                                                                             YES│       │NO
                                                                                ▼       ▼
                                                                             Trample  Cancel
                                                                             Dirt!    Trample

1. 防护鞋类与附魔机制

  • 皮革靴子与标签靴子:穿戴皮革靴子或带有 #agrarian_reform:soft_step_boots#c:boots/soft 标签的靴子,在行走、疾跑和低空跳跃时享有完全踩踏免疫。
  • 摔落保护附魔:靴子上附有任意等级的摔落保护附魔,即可在普通移动中完全防止耕地破坏。
  • 赤足极速判定:若实体脚部槽位为空 (getItemBySlot(EquipmentSlot.FEET).isEmpty()),将在 $0.0001\mu\text{s}$ 内瞬间跳过高开销的附魔检索。

2. 速度与下落冲击距离

在耕地上正常行走或疾跑绝不会损坏土壤。但在没有轻盈步态装备的情况下,从超过 0.6 格高度 坠落仍会踩坏耕地,保留莽撞跳跃的物理代价。

3. 玩家与驯服宠物专属保护

agrarian_reform:trample_immunity_players_onlytotal_trample_immunity 共同启用时:

  • 玩家与驯服宠物(如驯服的狼和猫)享有 100% 踩踏免疫保护。
  • 敌对与野生生物(僵尸、骷髅、村民、野生动物、劫掠兽)在坠落时依然会踩坏作物,完整保留守卫农场的防御战术趣味。

⚙️ GameRule 指令控制

bash
# 为所有实体开启彻底耕地踩踏免疫
/gamerule agrarian_reform:total_trample_immunity true

# 将踩踏免疫严格限制在玩家和驯服宠物身上
/gamerule agrarian_reform:total_trample_immunity true
/gamerule agrarian_reform:trample_immunity_players_only true

See also: 游戏规则 (GameRules) 参考, 美学表现与环境音效, and API 与附加模组集成.

Official documentation & web portal for Dasik Igaijinn mods.