Garden Drone Station

Garden Drone Station

alaindustrial:garden_drone_station
AgricultureLVImplementedtier-lvagriculturedroneautomationber

Summary

The Garden Drone Station is a 1×1 dock block (like a robot-vacuum base) from which a drone lifts off and patrols the area around the station within a 4-block radius. The drone is not an Entity — it's an object drawn by the station's own. Visually it looks and moves like a flying craft, but physically it always "belongs" to the station block and can never leave its zone.

The player puts seeds and bone meal into the station and hooks up EU/FE — from there the drone tends the farm on its own: tilling free dirt, planting seeds into empty tiles above suitable soil, speeding up immature crops with bone meal, and hauling ripe harvest straight into its own output slots (no ItemEntity ever spawns in the world). It supersedes the planned-but-unbuilt "Crop Matron" and "Crop Harvester" — one block instead of two, no duplicated mechanics.

Energy

FieldValue
Roleconsumer with buffer
Buffer (EU/FE)4000
Max input (EU/FE/tick)32 (LV)
Max output (EU/FE/tick)n/a (does not emit)
EU/FE per action8

The station connects to the energy network like any consumer, on all its working faces. EU/FE is spent only for a completed action — tilling, planting, fertilizing, or harvesting one tile — following the Electric Heater pattern: idling (nothing to do in the zone — out of seeds/fertilizer, or every tile already tended) costs 0 EU/FE, and the station goes into idle sleep instead of wasting energy or becoming a parasitic sink on the network.

Processing

The station doesn't use the crafting-recipe system — instead, on every drone flight (when a target is found) it performs one of four actions on a single zone tile.

FieldValue
Recipe typenone (not a recipe machine)
Actions per flight1 (one action — one tile)
Auto-unloadyes (harvest lands directly in the station's output slots)

The hoe powers two actions. Tilling and harvesting each spend one point of the hoe's durability and will not run without one: a tool that an action consumes but does not require makes no sense to the player. Planting and fertilizing need no hoe.

Action priority (checked in this order, the first match runs):

  1. Harvest — a tile with a ripe crop in the zone (needs a hoe).
  2. Plant — an empty tile above soil from #minecraft:supports_crops, provided matching seeds sit in the seed slot.
  3. Fertilize — a tile with an immature crop, provided bone meal sits in the fertilizer slot.
  4. Till — a tile of vanilla dirt or grass (needs a hoe; turns it into farmland).

This order keeps the "the farm tends itself" promise unbroken: without tilling as the fourth action, the promise would break the moment the player expands the farm.

Planting soil is a vanilla tag, not a block. Planting (and the zone-cache tile selection) treats any block from #minecraft:supports_crops as soil — the same tag the crop itself uses to decide whether it can stand on a block. Drone and plant therefore never disagree about what counts as ground: rich soil farmland from Farmer's Delight (and any modded soil added to this tag) the drone tends as a native farm tile — without a single line that knows a foreign id. Tilling does not follow the tag: only vanilla dirt and grass are turned into vanilla farmland, foreign soil is never dug over — the player got that rich soil with bone meal, and the station must not destroy it.

Flight. The action lands when the drone arrives, not when the target is picked: it flies at = 11 ticks per block of distance and only then does the work. A leg is never shorter than MIN_FLIGHT_TICKS = 26 ticks — otherwise the drone would cover the tile next door faster than the eye can follow. The trip home takes as long as the trip out, plus the LANDING_PAUSE_TICKS = 6 ticks the drone spends standing on the tile it worked (below), so one action costs at least 58 ticks (≈2.9 seconds), not a tick: the station tends the plot at the pace of a machine, not instantly. Without that it would tend a whole farm within a couple of ticks, which reads as teleportation rather than as a machine doing work. On arrival the job is re-validated — the world may have changed mid-flight (the player harvested it by hand, a piston moved it), so the target is checked again rather than trusted.

Flight sound. While the drone is airborne a quiet rotor loop plays, and it comes from the drone itself — the source travels with it rather than sitting on the station. It has to: the drone ranges several blocks out and passes right over the player's head, and a buzz arriving from the pad instead would read as a bug. An 8-block audible radius and 0.22 volume make it the quietest loop in the mod, for two reasons — it is the only sound whose source comes to the player, and the only one that plays for most of a work cycle. On the pad, and during the beat spent standing on a worked tile, it is silent.

Tilling sound. As it turns a tile, the drone plays the same vanilla hoe sound (minecraft:item.hoe.till) a player hears tilling by hand, at the same volume and pitch. Only tilling is voiced of the four actions: it is the one with an unambiguous vanilla counterpart, which planting, fertilizing and harvesting do not have.

Once the work is done the drone stands on the tile for 6 ticks before it heads home. Without that beat the action and the return leg began on the same tick: the drone touched the plot and lifted off inside a single frame, which read as a bounce rather than as a machine doing a job. The pause is only at the far end — on the pad it would shift the tick the action lands on, and that tick is what every test scenario counts to.

Scan zone. A 4-block radius around the station is exactly one standard 9×9 plot (2 × 4 + 1): the dock sits at its centre and reaches every corner. This is the tier-1 drone and it tends one such plot — later tiers still have room to grow, into several plots at once or into a zone wider than one. The target list for the zone is cached and invalidated by block updates inside the radius; a full cache rebuild happens no more often than once every = 20 ticks. Touching any zone position requires an level.isLoaded check first — the station never forces a synchronous chunk load.

Crop maturity is decided by a shared predicate reused from the Scythe (the same class that already decides whether a crop is ready to cut — pumpkin/melon stems, cactus/sugar cane base-only, berry bushes, and vanilla CropBlocks are all handled identically in both places, with no risk of the edge cases drifting apart).

Fertilizing goes through the standard vanilla BonemealableBlock interface (the same trio of methods already used by the Trellis for cotton) — the effect matches manual bone meal, minus the player and the click-particle simulation.

Harvesting without a player. The station doesn't break a block through the ServerPlayer path (there is no player) — instead it computes the ripe crop's drop server-side, inserts it into its own output slots, and only removes the crop block on full success. Neither an ItemEntity nor block-break events are created — the same conscious trade-off already accepted by the Pump when it drains a fluid source.

Inventory

SlotAcceptsCount
Seeds (0)items tagged as seeds for the matching cropup to a stack
Fertilizer (1)minecraft:bone_mealup to a stack
Drone (6)— the station is inert without it1
Hoe (7)any hoe (#minecraft:hoes); spent by tilling and harvesting1
Output 1–4 (2–5)insertion only by the station itself (harvest); manual/automated insertion from outside is blockedup to a stack each

Four output slots, not one — a ripe crop can yield more than one item type in a single action (e.g. wheat drops both wheat and wheat seeds separately); the mod's base machine model doesn't support mixed contents in a single output slot. Inserting the drop into the output slots is a two-pass operation ("simulate room for every stack first, mutate only on full success") — no partial harvest loss when the output is full.

Interface

Type: container (station GUI). Shows: energy buffer bar, seed/fertilizer/output slots, station status (out of resources / working / everything tended this cycle — readable from a distance via the drone model's status light color).

Block properties

The dock is not a full cube: a thin 1×1-block plate with a lit landing outline, two charging contacts, and yellow corner lamps (see "Appearance" below). The drone is drawn on top of it by a and has no collision/hitbox separate from the station.

FieldValue
Shapea low-profile plate (not a full cube; occluder covers the lower part of the block)
Hardness3.0
Blast resistance6.0
Toolpickaxe
Drops with energy NBTno (buffer/inventory/drone state persist via ValueInput/ValueOutput, not an item NBT drop)

Recipes

Crafting: (iron/steel casing, electronic circuit, propellers — the exact composition is fixed during implementation). No processing recipes — the station doesn't process items.

Progression

Tier: LV. Power: any LV source, e.g. Generator. Supersedes (no code): "Crop Matron" and "Crop Harvester" one block instead of two stationary ones with the same outcome. Requires: an electronic circuit to craft, like most of the mod's LV machines.

Sprinkler — the block next to it on the same plot; the two roles do not overlap. The station is a point worker: one action on one tile, paid in bone meal and EU/FE, and it tills, plants and harvests. The sprinkler is a passive zone: it touches neither the soil nor the crop, only speeds up everything growing around it, and pays in nutrient solution. They are meant to stand together. Scythe — source of the reused crop-maturity predicate. Trellis — the mod's existing BonemealableBlock precedent. Incubator — reference for a multi-slot, index-tag-validated inventory with a wider-than-base ContainerData. Pump — reference for bounded zone scanning, and the only precedent of a machine mutating a world block from its own tick with no player involved. Electric Heater — reference for "EU/FE only on a useful tick" (demand-driven consumption).

Crafting

Shaped Crafting
Any Copper Ingot
Any Iron Ingot
Any Copper Ingot
Any Iron Ingot
Electronic Circuit
Any Iron Ingot
Any Iron Ingot
Any Iron Ingot
Any Iron Ingot
Crafting Table
Garden Drone Station
Garden Drone Station