Farm System

The Farm System is the core harvesting engine of Tycoon.

It controls crop behavior, XP gain, essence rewards, custom drops, evolution items and growth rendering.

The system is area-based, performance-safe and supports both client-side and server-side crop rendering.


Farm Area

farm:
  trigger: WHEAT
  area:
    world: ""
    min: [0, 0, 0]
    max: [0, 0, 0]

trigger

Defines the main crop type used inside the farm area.

area

Defines the rectangular region where special farm logic applies.

If empty → system behaves globally.


Harvest Rules

If true, ageable crops must be fully grown before harvesting.


Render Mode

Available modes:

  • SERVER

  • CLIENT

This controls how crop breaking and regrowth are handled.


SERVER Mode (Authoritative)

Default and safest option.

Behavior

  • Blocks are physically modified on the server

  • Real block data changes

  • Uses region scheduler for growth

  • Fully synchronized across all players

  • No fake block states

Growth Logic

  • Ageable crops replant at age 0

  • Grow per stage with configurable tick delay

  • Double-height plants restore properly

  • Sugar cane restores correctly with height validation

Best For

  • Competitive servers

  • Boss damage systems

  • Shared farming environments

  • High player count farms


CLIENT Mode (Visual-Only Masking)

Optimized personal rendering.

Behavior

  • Real block is not removed

  • Player receives fake block change

  • Regrowth happens client-side only

  • Other players see original block state

  • Fully personal harvesting illusion

How It Works

  • Uses sendBlockChange

  • Registers fake harvest entries

  • Schedules client-only restoration

  • Does not modify world state

Options

  • ticks-per-stage → random growth interval

  • double-height-restore → restore delay

  • single-restore → restore delay

  • keep-final-stage → keep visually mature

Best For

  • Personal farms

  • Skyblock-style islands

  • High-performance setups

  • Visual-only crop systems


Growth System

Supports:

  • Fixed value: 10

  • Range: "8-12"

Each growth stage delay is randomly selected in range.


Drop System

straight-to-inventory

Directly inserts drops into player inventory.

drop-items-floor-if-full-inventory

If inventory full:

  • true → drop on ground

  • false → stop giving drops

Supports stacking and storage hooks.


Harvest Rule Structure

xp

  • Single value

  • Range "min-max"

min-level

Minimum Tycoon Hoe level required.

essence

Supports:

  • Single value

  • Range "min-max"


Custom Drop Items

Supports:

  • Custom name

  • Lore

  • Enchantments

  • Flags

  • Unbreakable

  • Custom model data

  • Full ItemFactory integration


Evolution Items

If player collects required amount → converts to evolution item.

Evolution can be placed inside:

  • drop.evolution-item

  • Or directly under rule


XP & Essence Calculation Flow

Final gain includes:

  • Base XP

  • Enchant bonuses

  • Prestige bonuses

  • Armor boosters

  • Pet boosts

  • Power-up boosts

Formula pipeline:

All boosts are additive before rounding.


Rounding Modes

Crop yield boosters support:

  • STOCHASTIC

  • ROUND

  • FLOOR

  • CEIL

Configured under enchant settings.


Boss Integration

Each crop break automatically notifies:

Boss damage is directly tied to farm activity.


Safety & Performance

  • ConcurrentHashMap stacking buffers

  • Essence batching (500ms window)

  • XP batching (5s window)

  • No sync database writes

  • RegionScheduler for growth

  • No heavy tick loops

  • Fully event-driven


Double Height Handling

Supported:

  • Sugar Cane

  • Sunflower

  • Lilac

  • Rose Bush

  • Peony

  • All Bisected blocks

Prevents bottom-half breaking exploits.

Last updated