HomeJavaModsLf-Pistons
Lf-Pistons
ModsJava

Lf-Pistons

by joaofixe_ · on Modrinth

Which build do you need?

This mod ships a separate file for every mod loader and every version of the game. Pick both, then download — the wrong build installs fine and then does nothing in the game.

Mod loader

Minecraft version

⬇ Download for 1.21.2–1.21.11 · Bukkit⬇ Download for 1.21.2–1.21.11 · Paper⬇ Download for 1.21.2–1.21.11 · Purpur⬇ Download for 1.21.2–1.21.11 · Spigot
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

LF-Pistons

🟧 LF-Pistons

🔵 Smart and optimized piston-based crop harvesting

Java 21 • Paper/Purpur 1.21.x


🔥 About

LF-Pistons is a lightweight and highly configurable plugin that creates an optimized automatic harvesting system using pistons.

When a supported plant reaches its harvest stage, the plugin checks whether a valid piston is pointing toward it. If a piston is detected, LF-Pistons automatically harvests the plant, generates its drops and safely resets the crop when necessary.

The system is event-driven and includes performance limits, cache optimization, drop grouping and automatic TPS/MSPT protection, making it suitable for servers with large farms and many active players.

LF-Pistons is ideal for:


⚙️ Main Features

🌱 Farming system

🌍 Per-world configuration

Each world can have its own:

🗂️ Reusable farm profiles

Create reusable profiles for different farm types and apply them to multiple worlds.

Example profiles can be created for:

🖥️ Management interface

📊 Harvest statistics

Persistent statistics are recorded:

Statistics can be accessed through commands and PlaceholderAPI.

🌐 Languages

Included languages:

English is used by default and can be changed in config.yml.


🌿 Supported Plants

Additional custom plants can be configured using the optional ItemsAdder and CustomCrops bridges.


🔄 How It Works

  1. A registered plant grows or becomes ready to harvest.
  2. LF-Pistons checks for a valid piston pointing toward the plant.
  3. The configured piston type and detection radius are verified.
  4. If powered-only mode is enabled, the piston must also be powered.
  5. Protection hooks and performance limits are checked.
  6. The plant is harvested and its configured drops are generated.
  7. Crops that can regrow are safely reset to their initial stage.
  8. The harvest is recorded in the statistics system.

By default, the piston only needs to point toward the plant. Enable powered-only if a redstone signal should also be required.


🧱 Piston Modes

The piston mode can be configured globally, through farm profiles or separately for each world.


🌾 Individual Plant Settings

Each plant can override the global configuration.

Available options include:

Custom drop format

MATERIAL:min-max:chance

Example:

WHEAT:1-2:1.0

This example generates between one and two wheat with a 100% chance.

Bone meal modes


♻️ Mature Plant Recovery

Plants may become fully grown while LF-Pistons is disabled, while the server is starting or while their chunks are unloaded.

LF-Pistons can recover these plants automatically:

Loaded chunks are processed gradually to prevent lag spikes.


🚀 Performance Protection

LF-Pistons includes multiple systems to safely handle large farms:

When server performance falls below the configured TPS or exceeds the configured MSPT, LF-Pistons temporarily reduces its processing limit.


🔍 Inspection and Diagnostics

Having trouble with a farm? LF-Pistons includes built-in troubleshooting tools.

Use /lfpistons inspect and click a plant to view:

Temporary diagnostics can be enabled for a limited number of minutes. The diagnostic system automatically disables itself to prevent unnecessary logging.

Example:

/lfpistons diagnose 5

This enables detailed diagnostics for five minutes.


✅ Configuration Validator

Use /lfpistons validate to detect configuration problems.

The validator checks:

The validator only runs when requested and has practically no impact on normal server performance.


⌨️ Commands

Command Description
/lfpistons Displays the available commands or opens the main interface
/lfpistons menu Opens the plant management menu
/lfpistons status Displays plants, cache, mode, server load, pending drops and diagnostics
/lfpistons stats [world] [plant] Displays persistent harvest statistics
/lfpistons inspect Enables plant and piston inspection mode
/lfpistons validate Validates materials, drops, profiles, limits and conflicts
/lfpistons diagnose [minutes|off] Enables or disables temporary diagnostics
/lfpistons recover Searches loaded chunks for mature plants
/lfpistons reload Reloads the plugin and displays what changed

Command alias: /lfp


🔑 Permissions

Permission Description Default
lfpistons.admin Full access to administrative commands and features Operators
lfpistons.status Allows access to /lfpistons status Everyone
lfpistons.stats Allows access to harvest statistics Operators
lfpistons.inspect Allows plant and piston inspection Operators

🧩 PlaceholderAPI

PlaceholderAPI is optional.

Available placeholders:

Replace WORLD_NAME and MATERIAL with the required world or Minecraft material name.


🔌 Optional Integrations

PlaceholderAPI

Provides harvest statistics and system state placeholders.

WorldGuard

Optionally blocks automatic harvesting inside protected regions.

GriefPrevention

Optionally blocks automatic harvesting inside claims.

ItemsAdder

Provides support for custom plant identifiers and display items.

CustomCrops

Provides support for custom crops, mature stages and custom drops.

All integrations are optional soft dependencies. LF-Pistons can start and operate without them.

WorldGuard and GriefPrevention restrictions are disabled by default. Automatic growth does not have a responsible player identity, so enabling these restrictions will block LF-Pistons harvesting inside protected locations.


🛠️ Developer API

LF-Pistons provides a public API through Bukkit's ServicesManager.

Other plugins can:

Available events:


💾 Configuration Safety

Existing configurations from previous versions are migrated automatically.

We still recommend creating a backup before every major update.


📥 Installation

  1. Download the latest LF-Pistons JAR.
  2. Stop your Minecraft server.
  3. Place the JAR inside the /plugins/ folder.
  4. Start the server.
  5. Configure the generated plugins/LF-Pistons/config.yml file.
  6. Run /lfpistons validate.
  7. Run /lfpistons status to confirm that the system is active.

🔄 Updating from an Older Version

  1. Stop the server.
  2. Back up the existing plugins/LF-Pistons/ folder.
  3. Replace the old JAR with the new version.
  4. Start the server normally.
  5. Existing configuration values will be migrated automatically.
  6. Run /lfpistons validate after startup.
  7. Review the console for migration or validation warnings.

Do not delete your existing configuration unless you want to reset the plugin completely.


❓ Troubleshooting

If a plant is not being harvested:

  1. Run /lfpistons status.
  2. Run /lfpistons validate.
  3. Use /lfpistons inspect and click the plant.
  4. Check whether the piston is pointing toward the plant.
  5. Check the configured piston mode.
  6. Check whether powered-only mode is enabled.
  7. Check WorldGuard and GriefPrevention restrictions.
  8. Use /lfpistons recover if the plant was already mature.
  9. Enable temporary diagnostics if the problem continues.

📌 Important Notes


💬 Support

Need help or want to report a problem?

👉 Join the LF Studios Discord


❤️ Made by LF Studios

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more