Mob Farm Processing - MarkusBordihn/BOs-Easy-Mob-Farm GitHub Wiki

โš™๏ธ Mob Farm Processing System

This guide explains how the Mob Farm processes captured mobs and generates loot, including the advanced item buffer system that prevents item loss.

๐Ÿ“‹ Table of Contents


Processing Overview

The Mob Farm uses a multi-stage processing system to convert captured mobs into valuable loot. The system is designed to be efficient, lag-free, and scalable for both single-player and multiplayer environments.

Key Components

  1. Farm Progress Tracker - Monitors how close the farm is to completing a processing cycle
  2. Loot Generator - Creates items based on mob type, farm tier, and enhancements
  3. Item Buffer - Temporarily stores items when output slots are full
  4. Output Slots - Final storage for processed loot (can be expanded with upgrades)

Processing Cycle

Step 1: Farm Status Check

Every tick (20 times per second), the farm checks its current status:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Is Redstone Power Active?           โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Yes โ†’ Status: DISABLED              โ”‚
โ”‚ No  โ†’ Continue to next check        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

States:

  • DISABLED - Farm is powered by redstone, no processing occurs
  • IDLE - No captured mob or waiting to start
  • WORKING - Actively processing
  • PROCESSING - Generating loot drops
  • FULL - Output slots and buffer are completely full

Step 2: Progress Accumulation

Every 20 ticks (1 second), the farm increases its progress based on:

  • Base Speed: 20 ticks per cycle (configurable via farmProgressingTime)
  • Tier Bonus:
    • Tier 0: +0 ticks
    • Tier 1: +2 ticks
    • Tier 2: +4 ticks
    • Tier 3: +6 ticks
  • Speed Enhancements: +6 ticks per speed enhancement item

Formula:

Progress per Cycle = Base Speed + Tier Bonus + Enhancement Bonuses

Example:

  • Tier 3 farm with 2 speed enhancements: 20 + 6 + (2 ร— 6) = 38 ticks/second
  • Time to complete: 6000 ticks รท 38 ticks/sec โ‰ˆ 158 seconds (~2.6 minutes)

Step 3: Loot Generation

When progress reaches 6000 ticks (5 minutes by default), the farm generates loot:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 1. Get Vanilla Loot Tables           โ”‚
โ”‚    - Entity-specific drops           โ”‚
โ”‚    - Modified by enchantments        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 2. Apply Custom Loot Tables          โ”‚
โ”‚    - OVERWRITE (replaces vanilla)    โ”‚
โ”‚    - PRIORITY (added first)          โ”‚
โ”‚    - BONUS (added after vanilla)     โ”‚
โ”‚    - FALLBACK (if no drops)          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 3. Add Bonus Drops (if configured)   โ”‚
โ”‚    - Based on farm type + tier       โ”‚
โ”‚    - Chance-based (1 in X)           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 4. Apply Filters                     โ”‚
โ”‚    - No Meat Filter                  โ”‚
โ”‚    - No Flowers Filter               โ”‚
โ”‚    - Specific Item Filters           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 5. Store Items (see next section)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Step 4: Item Storage with Buffer System

The farm attempts to store each item using a two-phase approach:

Phase 1: Direct Placement in Output Slots

For each item drop:
  For each output slot:
    If slot is empty:
      โ†’ Place item in slot
      โ†’ DONE
    
    If slot has same item AND count < max stack size:
      โ†’ Add to existing stack
      โ†’ If item fully merged: DONE
      โ†’ If partial merge: Continue to next slot

Phase 2: Buffer Storage (if enabled)

If an item cannot be placed in output slots:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Is Item Buffer Enabled?                     โ”‚
โ”‚ (enableItemBuffer = true)                   โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ YES โ†’ Check buffer space                    โ”‚
โ”‚ NO  โ†’ Skip to Phase 3                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Buffer Size < Max Buffer Size?              โ”‚
โ”‚ (default: 128 items)                        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ YES โ†’ Add item to buffer queue              โ”‚
โ”‚ NO  โ†’ Buffer is full, go to Phase 3         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Phase 3: Overflow Handling

When buffer is full or disabled:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Drop Items to World?                        โ”‚
โ”‚ (dropItemsToWorldWhenBufferFull)            โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ TRUE  โ†’ Drop items as entities              โ”‚
โ”‚ FALSE โ†’ Void items (deleted forever) โš ๏ธ     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โš ๏ธ Warning: When items are voided, they are permanently lost! A warning is logged to the server console.


Item Buffer System

The buffer system prevents item loss when output slots are temporarily full, giving extraction systems (hoppers, pipes, etc.) time to remove items.

How the Buffer Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    ITEM BUFFER QUEUE                    โ”‚
โ”‚  [Item 1] โ†’ [Item 2] โ†’ [Item 3] โ†’ ... โ†’ [Item 128]      โ”‚
โ”‚     โ†‘                                          โ†‘        โ”‚
โ”‚   INPUT                                     OUTPUT      โ”‚
โ”‚ (new items)                            (to output slots)โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Buffer Processing

Every 20 ticks (1 second) by default, the buffer attempts to move items to output slots:

  1. Takes first item from buffer queue
  2. Attempts placement in output slots (same logic as Phase 1)
  3. If successful: Removes item from buffer, continues to next item
  4. If failed: Stops processing until next cycle (output slots still full)
  5. Processes up to 8 items per cycle to avoid lag

Priority System

New drops always have priority over buffered items:

Processing Cycle:
  1. Process new mob drops first
  2. Store in output slots or buffer
  3. THEN process buffered items (separate tick cycle)

This ensures farms never stall even when buffer is processing old items.

Buffer Persistence

On Server Restart:

  • Buffer is automatically cleared to prevent item duplication exploits
  • Warning logged if buffer had items: "Cleared X buffered items on load"

During Normal Operation:

  • Buffer persists between chunks loading/unloading
  • Items remain in buffer until successfully placed or server restarts

Configuration Options

All settings are in config/easy_mob_farm/mob_farm.cfg:

Farm Processing Settings

# Time in ticks for farm to complete one processing cycle
# Default: 6000 (5 minutes)
# Lower = faster processing, higher = slower
farmProgressingTime=6000
# Tier progression speed bonuses
tier0progressionUpgradeSpeed=0
tier1progressionUpgradeSpeed=2
tier2progressionUpgradeSpeed=4
tier3progressionUpgradeSpeed=6
# Speed enhancement upgrade bonus
speedEnhancementUpgradeSpeed=6

Owner Processing Settings

# Whether farms only process when the owner is online
# Default: false
# Set to true to prevent offline resource accumulation
progressingRequiresOwnerToBeOnline=false

Buffer System Settings

# Enable temporary item buffer when output slots are full
# Default: true
# Set to false to disable buffer (items may be lost/voided)
enableItemBuffer=true
# Maximum number of items that can be buffered
# Default: 128
# Higher values = more temporary storage, more memory usage
maxBufferSize=128
# Ticks between buffer processing attempts
# Default: 20 (1 second)
# Lower = faster buffer clearing, higher = less frequent processing
bufferProcessInterval=20
# Drop items to world when buffer is full
# Default: false (items are voided instead)
# WARNING: true may cause lag with many item entities
dropItemsToWorldWhenBufferFull=false

Bonus Drop Settings

# Maximum multiplier for bonus drop amounts vs item stack size
# Default: 100
# Example: Diamond (stack size 64) can have up to 6400 configured
maxBonusDropMultiplier=100

Troubleshooting

Problem: Farm Shows "FULL" Status

Symptoms:

  • Farm progress stops
  • Status indicator shows "FULL"
  • No loot being produced

Solutions:

  1. Check Output Slots:

    • Are all output slots full?
    • Add more slot upgrade items (up to 27 total slots)
    • Connect hoppers/pipes to extract items faster
  2. Check Buffer:

    • Buffer may be full (128 items by default)
    • Increase maxBufferSize if using high-output farms
    • Check extraction system is working
  3. Check Logs:

    [WARN] Buffer full at (x, y, z), voiding items
    
    • Items are being deleted - increase buffer size or improve extraction
  4. Temporary Fix:

    • Remove items manually from output slots
    • Farm will resume automatically within 10 seconds (200 ticks)

Problem: Items Being Voided

Symptoms:

  • Warning logs: "voiding items (dropItemsToWorldWhenBufferFull=false)"
  • Expected items not appearing

Solutions:

  1. Enable Dropping to World (temporary):

    dropItemsToWorldWhenBufferFull=true

    โš ๏ธ May cause lag with many farms

  2. Increase Buffer Size:

    maxBufferSize=1024  # or higher
  3. Improve Item Extraction:

    • Add more hoppers
    • Use faster pipes (from other mods)
    • Add more output slot upgrades
  4. Reduce Processing Speed:

    farmProgressingTime=12000  # Double the time (10 minutes)

Problem: Farm Processing Too Slow

Symptoms:

  • Takes forever to get drops
  • Progress bar barely moves

Solutions:

  1. Upgrade Farm Tier:

    • Higher tiers = faster processing
    • Tier 3 is ~40% faster than Tier 0
  2. Add Speed Enhancements:

    • Each enhancement adds +6 ticks/second
    • Up to 6 enhancement slots available
  3. Adjust Config:

    farmProgressingTime=3000  # Half the default time (2.5 minutes)
  4. Check for Redstone:

    • Farm is disabled if powered by redstone
    • Remove any adjacent redstone signals

Problem: Not Getting Bonus Drops

Symptoms:

  • Only vanilla drops appearing
  • Expected bonus items missing

Solutions:

  1. Check Configuration:

    • Open config/easy_mob_farm/mob_farm_bonus.cfg
    • Verify entry exists for your farm type + tier + mob
    • Format: farm_type::tier::entity = item::amount::chance
  2. Understand Chance:

    • Chance is 1 in X
    • Lower number = higher probability
    • Example: chance=5 means 1 in 5 (20%)
  3. Check Filters:

    • Filter items may be blocking bonus drops
    • Remove filter items to test
  4. Verify Mob Type:

    • Farm type must match mob type
    • Example: Bees only work in Bee Hive Farm

Problem: Buffer Not Working

Symptoms:

  • Items still being lost despite buffer enabled
  • Buffer never fills up

Diagnostic Steps:

  1. Check Config:

    enableItemBuffer=true  # Must be true
    maxBufferSize=128      # Must be > 0
  2. Check Logs:

    • Debug mode shows buffer activity
    • "adding X to buffer (size: Y/128)"
  3. Verify Farm Status:

    • Buffer only activates when output slots are full
    • If slots have space, items go directly to slots (bypassing buffer)
  4. Test Setup:

    • Fill all output slots manually
    • Let farm process once
    • Check logs for buffer messages

Performance Optimization Tips

For Large-Scale Farms (10+ farms)

  1. Stagger Processing Delays:

    • Farms automatically randomize their processing tick to avoid simultaneous processing
    • Spreads server load across ticks
  2. Optimize Buffer Size:

    • Larger buffers = less item loss
    • But more memory usage
    • Recommended: 256-1024 per farm
  3. Use Efficient Extraction:

    • Avoid item entities (keep dropItemsToWorldWhenBufferFull=false)
    • Use direct pipe connections
    • Consider bulk storage systems
  4. Adjust Processing Time:

    • Longer cycles = less frequent processing
    • Reduces server overhead
    • Balance with desired output rate

For Modded Environments

  1. High-Capacity Storage Mods:

    • Refined Storage
    • Applied Energistics 2
    • Functional Storage
    • Can handle extreme drop rates
  2. Fast Transport:

    • LaserIO
    • XNet
    • Integrated Dynamics
    • Extract items faster than buffer fills
  3. Stack Size Mods:

    • If using stack size multipliers
    • Increase maxBonusDropMultiplier accordingly
    • Example: 64x stacks โ†’ set to 6400

Advanced: Buffer System Internals

For developers and advanced users:

Buffer Data Structure

private final Queue<ItemStack> itemBuffer = new LinkedList<>();
private int bufferProcessTick = 0;
  • Queue (FIFO): First-In-First-Out ensures oldest items are processed first
  • Per-Instance: Each farm has its own independent buffer
  • Non-Persistent: Cleared on server restart (prevents duplication)

Processing Logic

// Every bufferProcessInterval ticks
if(level.getGameTime() %bufferProcessInterval ==bufferProcessTick){

processBufferedItems();  // Process up to 8 items
}

Validation System

Bonus drops are validated on config load:

// Check amount vs item max stack size
int maxStackSize = item.getMaxStackSize();
int maxAllowed = maxStackSize * maxBonusDropMultiplier;

if(configuredAmount >maxAllowed){
  log.

warn("Capping {} to {}",configuredAmount, maxAllowed);
    itemStack.

setCount(maxAllowed);
}
โš ๏ธ **GitHub.com Fallback** โš ๏ธ