Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Avatar for kaiopiola

Auto-plant seeds that are dropped over farmlands.

Report Croplant?

CropPlant - Auto-Replanting Plugin for PaperMC

A PaperMC plugin that automatically plants seeds with intelligent area detection and visual effects.

Features

  • Area-based planting - Seeds search for available farmland within configurable radius
  • Connected farmland detection - Uses flood fill algorithm to find only connected farmlands
  • 3D farm support - Works with terraced/staircase farms (±1 block height difference)
  • Multi-seed stacks - Drops of 64 seeds plant on multiple farmlands automatically
  • Visual effects - Particle effects and sounds when planting (configurable)
  • Fully configurable via config.yml
  • Per-world configuration support
  • 9 different seed types supported
  • Lightweight and efficient
  • Debug mode for troubleshooting

Supported Seeds

  • Wheat Seeds → Wheat
  • Beetroot Seeds → Beetroots
  • Carrot → Carrots
  • Potato → Potatoes
  • Nether Wart → Nether Wart (on Soul Sand/Soil)
  • Torchflower Seeds → Torchflower Crop
  • Pitcher Pod → Pitcher Crop
  • Melon Seeds → Melon Stem
  • Pumpkin Seeds → Pumpkin Stem

Requirements

  • Java 21 or higher
  • PaperMC 1.21+ server
  • Maven for building

Installation

Pre-built JAR

  1. Download the latest croplant.jar from the releases
  2. Place it in your server's plugins folder
  3. Restart your server
  4. Configure the plugin in plugins/CropPlant/config.yml

Configuration

The plugin creates a config.yml file in plugins/CropPlant/:

# Enable/disable the plugin
enabled: true

# Check interval (in ticks, 20 ticks = 1 second)
check-interval: 1

# Maximum time to track an item (in ticks)
max-track-time: 100

# Plant radius - search for available farmland within this radius
# Only searches connected farmlands (flood fill algorithm)
# Supports terraced farms with ±1 block height difference
# Radius of 2 = 5x5 area, radius 3 = 7x7 area
plant-radius: 2

# Remove item after planting?
remove-item-after-plant: true

# Play particle effects when planting? (green particles)
play-particles: true

# Play sound effects when planting? (planting sound)
play-sounds: true

# List of worlds where the plugin works (empty = all worlds)
enabled-worlds: []

# Enabled seeds
enabled-seeds:
  - WHEAT_SEEDS
  - BEETROOT_SEEDS
  - CARROT
  - POTATO
  - MELON_SEEDS
  - PUMPKIN_SEEDS
  - TORCHFLOWER_SEEDS
  - PITCHER_POD
  - NETHER_WART

# Debug mode
debug: false

Configuration Options

  • enabled: Enable or disable the plugin
  • check-interval: How often to check if items have landed (in ticks). Lower = more responsive but more CPU intensive
  • max-track-time: Maximum time to track a falling item before giving up (prevents memory leaks)
  • plant-radius: Search radius for connected farmlands (default: 2 blocks = 5x5 area)
  • remove-item-after-plant: Whether to remove the seed item after planting
  • play-particles: Show green particle effects when planting (default: true)
  • play-sounds: Play planting sound effects (default: true)
  • enabled-worlds: List of world names where the plugin works. Empty list = all worlds
  • enabled-seeds: List of seed types that will auto-plant
  • debug: Enable debug logging to console

How It Works

  1. Seed Detection: When a seed item is dropped in the world, the plugin starts tracking it
  2. Landing Check: Every tick (or based on check-interval), it checks if the item has landed on the ground
  3. Farmland Validation: Once landed, checks if it's on farmland (or soul sand for nether wart). If not, ignores the seed
  4. Connected Area Search: Uses flood fill algorithm to find all connected farmlands within the configured radius
    • Only searches farmlands physically connected to the landing spot
    • Supports terraced/staircase farms with ±1 block height difference
    • Respects the plant-radius configuration as maximum search distance
  5. Smart Planting:
    • Sorts available spots by distance (nearest first)
    • Plants one seed per available farmland
    • If you drop 64 seeds on a 5x5 farm with 10 free spots, it plants 10 and leaves 54 on the ground
  6. Visual Feedback: Plays particle effects (green) and sound (planting sound) for each planted crop
  7. Cleanup: Removes planted seeds from the item stack

Information

CategoryGameplay
Published onApril 7, 2026
LicenseUnspecified
Downloads2
Stars1
Watchers2

Pinned Versions

Members