HomeJavaModsHLR (Crop hoppers)
Introduction
HLR is a simple yet powerful plugin aimed to reduce entity lag by tweaking how hoppers work. Though, it only tweaks specific hoppers as not to completely change the vanilla experience. This plugin is especially helpful if your server has a lot of gigantic farms (including mob farms), such as typical skyblock or factions servers.

How it works
This plugin works by instantaneously moving any item entities found in the item list to specific hopper(s) in a chunk. This essentially eliminates a large amount of physics calculations of the item entities, and reducing overall entity count. It also eliminates bulky water channels, and increases farm efficiency by greatly reducing item loss by either flying out of the collection channels or being destroyed by cactus etc.

Features

- Configurable permission use
- Configurable economy use and fee for /converthopper
- Configurable item whitelist with default items inputted which can be disabled
- Configurable chunk tweaked hopper limit
- Configurable messages
- Configurable cooldown use and time for /converthopper
- Configurable hopper name and lore
- Configurable amount of hoppers that can be converted at once
- Configurable enabled worlds
- Configurable farming tweaks
- Lightweight


Commands and permissions

Code (Text):
/converthopper - the main command of this plugin. Converts vanilla hoppers into specific hoppers.
/HLR help - shows the help page for this plugin.
/HLR reload - reloads the config file.
/HLR about - about this plugin. Shows author and version.
/HLR give - give an online player tweaked hoppers.
/HLR revert - revert tweaked hoppers back into their vanilla state.
Code (Text):
/converthopper - HLR.convert
Bypass fee charge (if set) for using /chopper - HLR.nofee
Bypass cooldown (if set) when using /chopper - HLR.nocooldown
Bypass conversion limit (if set) for converting hoppers - HLR.limitbypass
Bypass chunk hopper limit (if set) - HLR.nochunklimit
/HLR give - HLR.give*
/HLR reload - HLR.reload*

*These permissions cannot be disabled in the config.
Lag test

[NOTE] This lag test cannot fully represent its function as I cannot replicate a big enough simulation environment to extend the plugin to its full potential.

This lag test is performed in about 60 seconds, with gamerule randomtickspeed set to 60. 2GB RAM was allocated to the server as an effort to increase server load (which failed). Essentials, worldedit, vault, PermissionsEx and the plugin was installed.

Setups:
With HLR:
setup.png

Without HLR:
setup2.png

Both are with a 23*13*182 cactus farm.

Timings without HLR:
lagtest2.PNG

Timings with HLR:
lagtest.PNG

As you can see above, entity count and related events' PCT Ticks are heavily decreased, resulting in a lower server load.

Configuration file

Code (YAML):

# -------------------------------
#     HLR v1.3.2 config file
#    Created by despawningbone
# -------------------------------

# Choose which worlds the tweaked hopper will work in.
Enabled-in-worlds
:
 - world
 
# Here you can choose what type of items the tweaked hopper will take in.
ItemList
:
  # This includes all the common crops, i.e. Pumpkin, Cactus, Wheat, Seeds, Carrot,
  # Potato(including Poisonous ones), Sugarcane, Red/Brown Mushrooms, Melons and Nether warts.  
  Crops
: true
  # This includes all the common mob drops, i.e. Feather, Raw chicken, Raw Beef, Raw Porkchop,
  # Raw mutton, Spider eye, Ender pearl, Bone, Arrow, Wool, Iron Ingot, Blaze rod, Gunpowder,
  # String, Gold nugget, Slimeball, Ink sack, Leather, Rotten Flesh, Prismarine Shard, Prismarine Crystals and Raw Fish.
  Mob-drops
: true
  # Here you can add the custom items you want to be taken in by the tweaked hopper.
  # Please use Bukkit's material list's name.
  # For those items with a damage value, please do the item name followed by a colon, as shown in example 2.
  Custom-items
:
  # - EXAMPLE_MATERIAL
  # - EXAMPLE_MATERIAL:1
    -

# Here you can set how many hoppers can be converted at once.
# e.g. Max-amount: 5, players can't convert a stack of hoppers with more than 5 hoppers in it.
Max-amount
: 10

# Use permissions?
Use-permissions
: true

# You can set how many tweaked hoppers can be in 1 chunk here.
# set -1 for unlimited tweaked hoppers in one chunk.
# any number is or larger than 16*16 will be the same as unlimited tweaked hoppers.
Chunk-HopperLimit
: -1

# Retain the tweaked hopper or drop a new hopper upon tweaked hopper breaking?
Retain-tweaked
: false
# If retain tweaked hoppers, should it only drop when mined with silk touch?
Silk-only
: true

# Should the tweaked hopper drop into the player's inventory upon break or onto the world normally?
# This should fix the problem of tweaked hoppers flying out after being broken.
To-inv
: false

# Here you can set if player drops would be picked up by the hopper or not.
Greedy-mode
: false

# To further reduce lag caused by farms, this forces the following types of farms
# to only be able to work when a crop hopper is in the chunk.
# Set to false to disable the farm type.
Farm-tweaks
:
  #This refers to the initial spawning of entities by spawners, not their death.
  Spawners
:
    Allow
: true
    #This allows specific types of spawners to still work under no crop hoppers.
    Whitelist
:
     -
  #This refers to every farms using a piston to break the crop.
  Piston-farms
:
    Allow
: false
    #This blacklists the blocks you want pistons to not farm. Default is
    #Pumpkin, Melon and Sugarcane.
    Blacklist
:
     - PUMPKIN
      - MELON_BLOCK
      - SUGAR_CANE_BLOCK
  #This refers to every farms using water to break the crop.
  Water-farms
:
    Allow
: true
    #This blacklists the blocks you want water to not flow and destroy. Default is
    #Potato, Carrot, Wheat and Nether warts.
    Blacklist
:
     - POTATO
      - CARROT
      - CROPS
      - NETHER_WARTS
  #This refers to the conventional method of cactus breaking by adjacent block.
  Cactus-farms
: true
 
# Enable /converthopper cooldown?
Cooldown
:
  Enable
: false
  Seconds
: 30
 
# You can rename the tweaked hopper here.
Hopper-name
: "&3Farming &fHopper"

# You can set the lore of the tweaked hopper here.
Hopper-lore
:
 - "&7This hopper is special."
  - "&7It can find specific items"
  - "&7And teleport the items to it instantly."

# Use economy? Vault API required
Eco
:
  Use
: false
  Conversion-fee
: 0.0
 
Todo and known bugs

Todo:
- Add radius option instead of only one chunk
- Your suggestions :p
Known bugs:
- players with existing hoppers cannot reconvert if the admins changed either the lore or the name only
- when exception handling is fired, the item which fired the handling will not be picked up by the tweaked hoppers even if there is any in that affected chunk.

Source code is now available on GitHub: https://github.com/despawningbone/HLR

Commands

Plugin details

Read from the plugin's own plugin.yml.

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.

HLR (Crop hoppers) is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.11. Downloaded 6,083 times (via Spigot). Download it and open it directly in the game.

Explore more