HLR (Crop hoppers) 1.3.2

A simple yet powerful hopper tweaker used mainly for lag-reducing purposes.

  1. despawningbone
    Tested Minecraft Versions:
    • 1.8
    • 1.11
    despawningbone, ideas from various places/people
    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.


    - 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.

    With HLR:

    Without HLR:

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

    Timings without HLR:

    Timings with HLR:

    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.
     - world
    # Here you can choose what type of items the tweaked hopper will take in.
     # 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.  
    : 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.
    : 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.

    # 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.
    : 10

    # 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.
    : -1

    # Retain the tweaked hopper or drop a new hopper upon tweaked hopper breaking?
    : false
    # If retain tweaked hoppers, should it only drop when mined with silk touch?
    : 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.
    : false

    # Here you can set if player drops would be picked up by the hopper or not.
    : 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.
     #This refers to the initial spawning of entities by spawners, not their death.
    : true
        #This allows specific types of spawners to still work under no crop hoppers.
      #This refers to every farms using a piston to break the crop.
    : false
        #This blacklists the blocks you want pistons to not farm. Default is
        #Pumpkin, Melon and Sugarcane.
         - PUMPKIN
          - MELON_BLOCK
          - SUGAR_CANE_BLOCK
      #This refers to every farms using water to break the crop.
    : true
        #This blacklists the blocks you want water to not flow and destroy. Default is
        #Potato, Carrot, Wheat and Nether warts.
         - POTATO
          - CARROT
          - CROPS
          - NETHER_WARTS
      #This refers to the conventional method of cactus breaking by adjacent block.
    : true
    # Enable /converthopper cooldown?
    : false
    : 30
    # You can rename the tweaked hopper here.
    : "&3Farming &fHopper"

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

    # Use economy? Vault API required
    : false
    : 0.0
    Todo and known bugs

    - 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
    pinkpig and Tractors like this.

Recent Reviews

  1. Riknesh
    Version: 1.3.2
    Great plugin...really helped reduce alot of lags caused by entities.

    But can you add the option to change/tweak to item transfer rate of the hoppers. Even though the hopper transfer rate in my spigot.yml is set to a fast rate, the crop hopper transfer rate is still the same. So can you add this option. THX
  2. Romain320
    Version: 1.3.1
    Hello i have one problemes [22:17:49] [Server thread/ERROR]: Could not pass event BlockPlaceEvent to HLR v1.2.2


    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at org.bukkit.craftbukkit.v1_9_R1.event.CraftEventFactory.callBlockPlaceEvent(CraftEventFactory.java:142) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at net.minecraft.server.v1_9_R1.ItemStack.placeItem(ItemStack.java:159) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at net.minecraft.server.v1_9_R1.PlayerInteractManager.a(PlayerInteractManager.java:522) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at net.minecraft.server.v1_9_R1.PlayerConnection.a(PlayerConnection.java:888) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at net.minecraft.server.v1_9_R1.PacketPlayInUseItem.a(SourceFile:55) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at net.minecraft.server.v1_9_R1.PacketPlayInUseItem.a(SourceFile:11) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at net.minecraft.server.v1_9_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_72]

    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_72]

    at net.minecraft.server.v1_9_R1.SystemUtils.a(SourceFile:45) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:721) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_72]

    Caused by: java.lang.NoSuchMethodError: org.bukkit.event.block.BlockPlaceEvent.getHand()Lorg/bukkit/inventory/EquipmentSlot;

    at me.despawningbone.HLR.CHlistener.onBlockPlace(CHlistener.java:51) ~[?:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_72]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_72]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_72]

    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_72]

    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.9.jar:git-Spigot-104c8c8-00d3334]

    ... 18 more
    1. despawningbone
      Author's Response
      Posting requests for help here will not be entertained. Besides, this alone does not give enough info, and I cannot continue a message chain here.
      Therefore, please consider using the discussion thread instead, or even direct message me will be a much more viable option.
  3. Akakarumba
    Version: 1.3.1
    Thanks for the give command, and the speed of implementing it, whoaa.
    I can't wait to use it in my world!
  4. coolfire02
    Version: 1.3.1
    The give command update. Absolutely spot on! This plugin has not been the most attractive but has been the most useful plugin out there! Especially for skyblock and now prisons :D
  5. Akakarumba
    Version: 1.3.0b
    Hey, really good job here, could you implement a function close to a /give chopper ?
    Would be very great for shop purpose.
  6. ogplayerfc
    Version: 1.3.0b
    I would change it after Ill see improvement, this plugin seems to broke my redstone on my server, fix and ill change
    1. despawningbone
      Author's Response
      It would be nice if you have given me more details, and not in the review section. The only possible place where redstone might be affected is the tweaked hoppers itself, which in all my testings are all according to vanilla redstone, except for the collection part. Mind if you give me your plugin list, details about what redstone contraption has broken and how has it broken, instead of demanding a fix when I don't even have any information?
  7. jhonny112411
    Version: 1.3.0b
    Deff would be amazing if you could add a radius option soon. Been looking for this for a while. Also if you could add a way to change how many items the hopper passes on to the chest with a config would be amazing! Great plugin though!!
    1. despawningbone
      Author's Response
      From what I understand, the amount of items that the hopper passes on to the chest is configured in the bukkit configuration file globally, and not a value i can tweak. But for the radius, i will definitely think of ways to implement it, as it is also on my todo list for pretty long now :P
  8. Tractors
    Version: 1.3.0b
    Bloody awesome plugin! Theres no other here on spigot like it, may I recommend a command to give players hoppers though? You just specify their name and amount of Tweaked hoppers
  9. rubus8
    Version: 1.2.2
    Great plugin, no issues i have come across, all customizable. Keep up the good work
  10. coolfire02
    Version: 1.2.2
    Excellent plugin! Found no flaws when I tried it! Hoppers arent as server consuming anymore! Really really awesome! Cant wait to see more of your future plugins! <3