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.