StackMob - Enhance your servers performance without the sacrifice 5.7.1

Enhance your server performance by 'stacking' or 'merging' entities, without breaking grinders.

  1. antiPerson
    Native Minecraft Version:
    1.16
    Tested Minecraft Versions:
    • 1.16
    • 1.17
    Source Code:
    https://github.com/Nathat23/StackMob-5
    Languages Supported:
    All with entity-translations.yml
    Supercharge your servers' performance, without breaking grinders.
    [​IMG]
    Many people (rightly so) advise against using mob stackers because of their impact on gameplay for a minuscule performance gain. StackMob offers the flexibility your server needs so you can target the worst lag offenders, without ruining the fun for everyone else.
    Features:
    • Ability to blacklist certain spawn reasons, entity types or worlds to prevent stacking
    • Ability to only stack mobs if they have moved.
    • Hidable nametag - nametag only appears when the player is in close proximity.
    • Support for all entity traits (sheep colours, age, love mode etc)
    • Ability to disable stacks from targeting players.
    • Multiple death methods - different ways to decrease entity stack size. Chose from single die, all entities die, random amount die or an amount dependent on damage caused get removed.
    • Multiplication of drops, experience points and player stats on stack death.
    • 'Wait to stack' feature. Allows a brief period of time after initial spawn before stacking is enabled. This means that mob grinders do not get broken as entities don't merge in mid-air.
    • Support for plugins such as MythicMobs, Citizens, MyPet, Jobs, ClearLagg, McMMO and WorldGuard (a custom 'entity-stacking' flag to be used in regions)
    • Flexible Configuration! Most configuration options can be customised for specific entity types.

    Code (YAML):

    # StackMob ${project.version} Configuration file - by antiPerson and contributors.
    # If the comments have been removed, you can find a version with comments at https://github.com/Nathat23/StackMob-5/tree/master/src/main/resources
    #
    # Most options can be customised for specific entity types, for details about this, see the end of this file.
    # Asterisk meaning:
    # (*) This option cannot be overridden in the 'custom' section at the end of this file.
    # (**) The following option requires the use of Paper (https://papermc.io) because the API needed is not in Spigot.
    # Spigot JavaDoc Reference:
    # (1) https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html
    # (2) https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreatureSpawnEvent.SpawnReason.html
    # (3) https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
    # (4) https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html

    stack
    :
     # The maximum size that a stack can have.
      max-size
    : 30
      # How often entities should be checked for stacking (in ticks. 20 ticks = 1 second) (*)
      interval
    : 100
      # The area around an entity for which applicable stacks should be found.
      # Format: [(x cord),(y cord),(z cord)]
      merge-range
    : [10,10,10]
      # Only begin to stack entities when this amount of entities are nearby.
      threshold
    :
        enabled
    : true
        amount
    : 5
      # Only find matches for this mob if it has moved from the last time nearby mobs were checked. (*)
      # This may break grinders etc, which is why for now it is disabled by default.
      # Please give feedback at https://github.com/Nathat23/StackMob-5/issues/198
      check-location
    :
        enabled
    : false
        # The distance threshold for the check
        distance
    : 1.0

    # Names of worlds where there should be no stacking
    worlds-blacklist
    : []
    worlds-blacklist-invert
    : false
    # Types of entity which should not stack (3)
    types-blacklist
    : [VILLAGER]
    types-blacklist-invert
    : false
    # If the entity's spawn reason is listed below, do not stack. (2)
    reason-blacklist
    :
     - SHOULDER_ENTITY
      - NATURAL
    reason-blacklist-invert
    : false

    display-name
    :
     # The formatting of the name tag which is shown when the stack size is above the threshold.
      # Both legacy and RGB hex color codes are supported, these need to be prefixed by the '&' symbol.
      # Placeholders:
      # %type% - the entity's type
      # %size% - the size of the stack
      format
    : '&a%type% &d(%size%)'
      # Whether the display tag can only be seen when the player targets the entity.
      # Mode:
      # ALWAYS - The tag will always be visible as long as the entity is loaded.
      # HOVER - The tag will only be visible when the player hovers their crosshair on the entity.
      # NEARBY - The tag will only be visible when the player is in range of the entity. (more resource intensive, requires ProtocolLib on 1.15 servers)
      visibility
    : NEARBY
      # Options for when 'NEARBY' is used above. (*)
      nearby
    :
       # The range from which the tag should be visible.
        # Format: [(x cord),(y cord),(z cord)]
        range
    : [12,6,12]
        # How often (in ticks) the tag visibility status of an entity should be updated. (20 ticks = 1 second)
        interval
    : 20
      # Don't show the tag if the stack size of this entity if it is equal to or below the value specified.
      threshold
    : 1

    # Whether entity specific traits (eg. profession, colour) should be segregated (*)
    traits
    :
      sheep-color
    : true
      sheep-sheared
    : true
      slime-size
    : true
      horse-color
    : true
      llama-color
    : true
      parrot-variant
    : true
      drowned-hand-item
    : true
      age
    : true
      breed-mode
    : true
      love-mode
    : true
      cat-type
    : true
      mooshroom-variant
    : true
      fox-type
    : true
      bee-nectar
    : true
      bee-stung
    : true
      zoglin-baby
    : true
      piglin-baby
    : true
      leashed
    : true
      villager-profession
    : true
      potion-effect
    : true
      # Prevent pregnant turtles from stacking. (**)
      has-egg
    : true

    # Prevent stacked mobs from targeting players.
    # Similar to no-ai, but allows for movement of entities.
    disable-targeting
    :
      enabled
    : false
      # If the entity's type is listed below, do not disable targeting. (3)
      type-blacklist
    : []
      type-blacklist-invert
    : false
      # If the entity's spawns reason is listed below, do not disable targeting (**) (2)
      reason-blacklist
    : []
      reason-blacklist-invert
    : false

    # What should be done when these entity actions occur. (*)
    events
    :
     # When an entity picks up armor or other equipment
      equip
    :
        enabled
    : true
        # IGNORE - do not take picked up equipment into consideration when stacking
        # DROP_ITEMS - drop picked up items when about to stack
        # PREVENT_STACK - do not stack this entity.
        mode
    : IGNORE
      # When an entity is feed its food.
      breed
    :
        enabled
    : true
        # MULTIPLY - spawn as many baby entities possible providing there is enough food fed.
        # SPLIT - slice off an entity to that it can be bred normally.
        mode
    : MULTIPLY
        # Limit the amount of baby entities spawned when using MULTIPLY mode. -1 = disabled.
        limit
    : -1
      # When an entity is dyed.
      dye
    :
        enabled
    : true
        # MULTIPLY - dye as many entities possible providing there is enough dye.
        # SPLIT - slice off an entity to that it can be dyed normally.
        mode
    : MULTIPLY
        # Limit the amount of sheep dyed when using MULTIPLY mode. -1 = disabled.
        limit
    : -1
      # When an entity is sheared.
      shear
    :
        enabled
    : true
        # MULTIPLY - shear as many entities possible providing the shears have enough durability.
        # SPLIT - slice off an entity to that it can be sheared normally.
        mode
    : MULTIPLY
        # Limit the amount of sheep sheared when using MULTIPLY mode. -1 = disabled.
        limit
    : -1
      multiply
    :
       # Chicken eggs and turtle scutes.
        drops
    : true
        explosion
    : true
        slime-split
    : true
      divide
    :
        nametag
    : true
        tame
    : true
        # Only bees currently.
        enter-block
    : true
        # Only fishes currently.
        bucket-fill
    : true
      remove-stack-data
    :
       # Should we remove the stack data of an entity that was unstacked as a result of nametag division/split?
        # Setting this to false will cause entities that were nametagged to potentially become stacked again.
        nametag
    : true

    # How entities should die
    death
    :
     # Rather than spawn a new entity in place of the killed entity, just decrease the stack size instead. (**)
      skip-animation
    : false
      # Death amount options:
      # SINGLE - Only one entity dies.
      # ALL - Every entity dies.
      # STEP - A random amount dies.
      # STEP_DAMAGE - An amount that depends on the damage done dies.
      #
      # Each death option has it's own blacklist for entity traits:
      # reason-blacklist - the last damage cause of the entity, which results in is death. (1)
      # spawn-reason-blacklist - the spawn reason of the entity. (**) (2)
      # type-blacklist - entity type. (3)
      #
      # The priority 1 is highest and 4 is lowest.
      # If the killed entity is blacklisted, either by type, spawn reason or death reasons (the last damage cause),
      # by the highest priority method, then we will attempt to use the next highest priority death method.
      SINGLE
    :
        priority
    : 4
        reason-blacklist
    : []
        reason-blacklist-invert
    : false
        spawn-reason-blacklist
    : []
        spawn-reason-blacklist-invert
    : false
        type-blacklist
    : []
        type-blacklist-invert
    : false
      ALL
    :
        priority
    : 3
        reason-blacklist
    : []
        reason-blacklist-invert
    : false
        spawn-reason-blacklist
    : [ ]
        spawn-reason-blacklist-invert
    : false
        type-blacklist
    : []
        type-blacklist-invert
    : false
      STEP
    :
        priority
    : 2
        reason-blacklist
    : []
        reason-blacklist-invert
    : false
        spawn-reason-blacklist
    : [ ]
        spawn-reason-blacklist-invert
    : false
        type-blacklist
    : []
        type-blacklist-invert
    : false
        max-step
    : 5
        min-step
    : 1
      STEP_DAMAGE
    :
        priority
    : 1
        reason-blacklist
    : []
        reason-blacklist-invert
    : false
        spawn-reason-blacklist
    : [ ]
        spawn-reason-blacklist-invert
    : false
        type-blacklist
    : []
        type-blacklist-invert
    : false

    # Multiply entity drops on entity death.
    drops
    :
      enabled
    : true
      use-loot-tables
    : true
      # If each mob should only drop one of the items in the list. (4)
      one-per-stack
    : []
      one-per-stack-invert
    : false
      # Items that should not be dropped. (4)
      item-blacklist
    : []
      item-blacklist-invert
    : false
      # Death reasons that should not mean that drops are multiplied. (1)
      reason-blacklist
    : []
      reason-blacklist-invert
    : false
      # Types of entity for which drops should not be dropped for. (3)
      type-blacklist
    : []
      type-blacklist-invert
    : false

    # Multiply entity experience on entity death.
    experience
    :
      enabled
    : true
      # The bounds that should be used for the random multiplier.
      multiplier-min
    : 0.5
      multiplier-max
    : 0.8
      # Types of entity for which exp should not be dropped for. (3)
      type-blacklist
    : []
      type-blacklist-invert
    : false

    # Multiply the player stats which can be seen by the player from the game menu.
    player-stats
    : true

    # If specific entities should have a waiting time before their first stack.
    # Designed for monster grinders etc.
    wait-to-stack
    :
      enabled
    : true
      # For (x) times the stack task fires after spawn, don't stack this entity.
      wait-time
    : 5
      # Entity types that this should work for. (3)
      types-whitelist
    :
       - ZOMBIE
        - SKELETON
        - ZOMBIFIED_PIGLIN
        - CREEPER
        - ENDERMAN
      types-whitelist-invert
    : false
      # Spawn reasons that this should work for. (2)
      reasons-whitelist
    :
       - SPAWNER
      reasons-whitelist-invert
    : false

    # Enable/disable integration with other plugins. (*)
    hooks
    :
     # Allows the custom 'entity-stacking' flag to be used in worldguard regions.
      worldguard
    : true
      mythicmobs
    :
        stack
    : false
        # Blacklist of MythicMob types (uses the internal name)
        # This blacklist does not take effect if the prevent-stack option is enabled below.
        stack-blacklist
    : [ ]
        stack-blacklist-invert
    : false
        # When this option is enabled, MythicMobs will not stack.
        prevent-stack
    : true
      # Prevent citizens npcs from stacking.
      citizens
    : true
      # Prevent stacked entities from giving mcmmo experience.
      mcmmo
    : true
      # Prevent stacked entities from giving job payments.
      jobs
    : true
      # Allows the use of ProtocolLib, which is used when the server version is not the native one of the plugin.
      protocollib
    : true
      # Make it so that ClearLagg removes stacked entities.
      clearlagg
    : false
      # Make it so that MyPet pets do not stack.
      mypet
    : true

    ## Some options can be modified for specific entity types. An example is shown below. Remove comments to see this in action.
    ## Options and sections with a (*) in the comment preceding cannot be overridden.
    #custom:
    #  # The entity type
    #  CREEPER:
    #    # The option to override. This should be the same as it appears above.
    #    stack:
    #      max-size: 30
    #  SKELETON:
    #    # Entities can also inherit options from other entities, using the 'clone' option preceded by the entity type to clone.
    #    clone: CREEPER
    #    # The cloned custom options can still be overridden.
    #    stack:
    #      max-size: 5
     


    En Español:

    bStats:
    If you don't want that your server sends data to bStats you can disable it by setting enabled to false in the bStats config file. The config can be found in the /plugins/bStats/config.yml file. bStats has nearly no effect on your server's performance and the sent data is completely anonymous so please consider twice if you really want to disable it.

    Seeing that lot's of servers are using their plugin can keep plugin authors motivated and some of the data can also be used to improve their plugins.

    Do you like this plugin? Please leave a review below - it helps a lot. Found a bug or have a suggestion? Post it on the Issue Tracker

    Discord support server: https://discord.gg/fz9xzuB

Recent Reviews

  1. CoolJWB
    CoolJWB
    5/5,
    Version: 5.7.1
    You saved the day, thanks a lot!
    It's rare to see a plugin that works for the latest version with advanced configuration and for free. I tested many edge cases I expected would not work and it passed them all, 5/5 stars.
  2. GeneralTobb
    GeneralTobb
    1/5,
    Version: 5.6.2
    Neueste Version funktioniert leider nicht. Nach Neustart keine Installation des Plugins. Version 5.2.3 funktioniert aber.
    1. antiPerson
      Author's Response
      you need java 16 for the latest version
  3. SHEEPU
    SHEEPU
    5/5,
    Version: 5.6.2
    [12:48:22 WARN]: org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: JVMCFRE003 主要版本错误;类=uk/antiperson/stackmob/StackMob,偏移量=6
    [12:48:22 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:157)
    [12:48:22 WARN]: at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414)
    [12:48:22 WARN]: at com.rylinaux.plugman.util.PluginUtil.load(PluginUtil.java:356)
    [12:48:22 WARN]: at com.rylinaux.plugman.command.LoadCommand.execute(LoadCommand.java:114)
    [12:48:22 WARN]: at com.rylinaux.plugman.PlugManCommandHandler.onCommand(PlugManCommandHandler.java:95)
    [12:48:22 WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
    [12:48:22 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159)
    [12:48:22 WARN]: at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:826)
    [12:48:22 WARN]: at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchServerCommand(CraftServer.java:788)
    [12:48:22 WARN]: at net.minecraft.server.v1_16_R3.DedicatedServer.handleCommandQueue(DedicatedServer.java:470)
    [12:48:22 WARN]: at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:437)
    [12:48:22 WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1342)
    [12:48:22 WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1130)
    [12:48:22 WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291)
    [12:48:22 WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer$$Lambda$3144/0x0000000000000000.run(Unknown Source)
    [12:48:22 WARN]: at java.base/java.lang.Thread.run(Thread.java:836)
    [12:48:22 WARN]: Caused by: java.lang.UnsupportedClassVersionError: JVMCFRE003 主要版本错误;类=uk/antiperson/stackmob/StackMob,偏移量=6
    [12:48:22 WARN]: at java.base/java.lang.ClassLoader.defineClassImpl(Native Method)
    [12:48:22 WARN]: at java.base/java.lang.ClassLoader.defineClassInternal(ClassLoader.java:479)
    [12:48:22 WARN]: at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:440)
    [12:48:22 WARN]: at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
    [12:48:22 WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:201)
    [12:48:22 WARN]: at java.base/java.lang.ClassLoader.loadClassHelper(ClassLoader.java:1183)
    [12:48:22 WARN]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1098)
    [12:48:22 WARN]: at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:119)
    [12:48:22 WARN]: at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:114)
    [12:48:22 WARN]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1081)
    [12:48:22 WARN]: at java.base/java.lang.Class.forNameImpl(Native Method)
    [12:48:22 WARN]: at java.base/java.lang.Class.forName(Class.java:407)
    [12:48:22 WARN]: at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:82)
    [12:48:22 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:153)
    [12:48:22 WARN]: ... 15 more
    1. antiPerson
      Author's Response
      you need java 16
  4. blind420
    blind420
    5/5,
    Version: 5.5.6
    The update works just fine. I installed this plugin just the other day in effort to reduce lag on my server. This plugin along with some server config optimizations my server runs like butter. Cheers
  5. Gork125324
    Gork125324
    4/5,
    Version: 5.5.3
    I love the plugin I just have one question is there a way to stop passive mobs from stacking I couldnt find a way to do that, i need them not to stack cause of some farms i have it breaks them
  6. KolakZ
    KolakZ
    3/5,
    Version: 5.5.3
    The issues page on your github is on read-only so I'm posting a bug report here. For some reason, some mob stacks just don't work
  7. Quanfc
    Quanfc
    4/5,
    Version: 5.5.0
    This is a good plugin but I have a few questions
    1. How can I feed my pets?
    2. Can I limit friendly animal stacking to 5 and unfriendly mobs to 15 or 20?
  8. CharlesDeLancey
    CharlesDeLancey
    5/5,
    Version: 5.5.0
    The plugin has been great so far, however i have a couple questions in regards to limiting stacking. Is it possible to keep Naturally Spawned passive animals from stacking, while making those that are from spawners stack, and having all hostile mobs stack? I see there is a custom section, but i don't really know much about it, or how it works. If this isn't the right place to ask for help, i do apologize in advance.
    1. antiPerson
      Author's Response
      You would need to make use the custom section to change the reasons-blacklist for a passive mob type, then add a clone section for every other passive mob.
  9. andrewkm
    andrewkm
    5/5,
    Version: 5.5.0
    Amazing stacking plugin. Constant updates, constant ticket replies, knowledgeable developer who works with every server to get things right! Flawless! Highly recommend!
  10. mar_robHD
    mar_robHD
    4/5,
    Version: 5.5.0
    Good plugin, but please add the ability (command) to unstack entity's.
    Or is there a special command to do that now