🌱 鳥糞生成與農作物施肥
📌 代碼倉庫原始碼免責聲明:本維基文件反映了倉庫當前的原始碼狀態,可能包含領先於 CurseForge 與 Modrinth 上公開發布版本的最新開發提交或未發布功能。
| Parameter | Specification Details |
|---|---|
| NBT Persistence Tag | betterbats:guano_ticks (Integer) |
| Default Timer Threshold | 12000 ticks ($600\text{ seconds} / 10\text{ minutes}$) |
| Speed GameRule Key | better-bats:bat_guano_threshold |
| Item Drop GameRule Key | better-bats:bat_drop_guano_item (Default: false) |
| Crop Target Interface | net.minecraft.world.level.block.BonemealableBlock |
| Farmland Search Depth | Up to 20 blocks vertically below roost position |
| Fertilizer Particles | HAPPY_VILLAGER (Success) / MYCELIUM (Soil drop) |
| Item Entity Drop | minecraft:bone_meal (When item drop enabled) |
☕ 獨立開發者寄語:如果你喜歡蝙蝠逼真的三維群飛和鳥糞為莊稼施肥的生態體驗,歡迎在 Ko-fi 上支持我的獨立開發!
⌛ 鳥糞累積與施肥觸發
While a bat is roosting (isResting() == true), each game tick increments its internal guano_ticks counter. Once the counter reaches the threshold specified by better-bats:bat_guano_threshold:
- A downward raycast checks up to 20 blocks below the bat's position.
- If a
BonemealableBlock(e.g. wheat, carrots, potatoes, beetroots) is detected, bone meal fertilization is applied automatically with greenHAPPY_VILLAGERsparkles. - If
better-bats:bat_drop_guano_itemistrue, a physicalminecraft:bone_mealitem drops at the ground coordinate. - The
guano_tickscounter resets to0.
🌾 農作物與土壤反應
$$\text{Fertilization Interval} = \frac{T_{\text{threshold}}}{20.0} \quad (\text{seconds})$$
Setting bat_guano_threshold to a lower value increases the frequency of automatic crop fertilization.
