🌾 右クリック収穫と自動再植システム
Agrarian Reformには、手軽な右クリック収穫機能(QoL)が含まれています。成熟した作物を右クリックするだけで収穫と自動再植え付けが同時に行われ、堅牢な6次元インタラクション保護によって安全に動作します。
📊 右クリック収穫インフォボックス
| Property | Value |
|---|---|
| Handler Class | net.instantgratification.agrarianreform.AgrarianReformFabric |
| Event Target | UseBlockCallback.EVENT |
| トリガー動作 | メインハンドで作物を右クリック(使用) |
| 発生効果 | 収穫物をドロップし、作物を段階0にリセットして収穫音を再生 |
| スニーク時の回避 | スニーク+右クリック(player.isSecondaryUseActive())で作物の上にブロックを設置可能 |
| オフハンド防止 | メインハンド限定(hand != MAIN_HANDの場合は即座にPASS) |
| GameRule Toggle | agrarian_reform:right_click_harvest (Default: true) |
⚙️ 6次元インタラクション判定フロー
PLAYER RIGHT-CLICKS CROP BLOCK
│
▼
1. Is Hand MAIN_HAND? (Off-Hand Debounce)
┌────┴────┐
YES│ │NO
▼ ▼
2. Is Player Sneaking? (Secondary Use Bypass)
(player.isSecondaryUseActive())
┌────┴────┐
NO│ │YES
▼ ▼
3. Is right_click_harvest GameRule true?
┌────┴────┐
YES│ │NO
▼ ▼
4. Is crop at maximum age (isMaxAge)?
┌────┴────┐
YES│ │NO
▼ ▼
5. Sided Execution & Item Drops
- Query loot table on server side (!level.isClientSide)
- Spawn drops into world
- Reset block state to Age 0
- Play harvest & crop rustle sound
- Return InteractionResult.SUCCESS🌾 対応作物一覧
- Wheat (
minecraft:wheat) - Carrots (
minecraft:carrots) - Potatoes (
minecraft:potatoes) - Beetroots (
minecraft:beetroots) - MOD農業のサポート:
CropBlockを継承しているか#c:cropsタグを持つすべての作物が完全対応。
⚙️ サーバーコマンド設定
bash
/gamerule agrarian_reform:right_click_harvest falseSee also: 種蒔きと草ブロック育成, 作物レジストリと汎用作物, and 汎用骨粉システム.
