NoGrind - Mobs only drop items/exp when killed by players [1564]

Discussion in 'Inactive/Unsupported Plugins' started by TerXIII, Dec 9, 2011.

  1. Offline

    TerXIII

    NoGrind
    A customizable mob farm remover.

    http://dev.bukkit.org/server-mods/nogrind/



    Are you running a server with an economy? Sick of your players HAVING to have a mob spawner just to keep up with the jonses? This plugin removes all mob drops unless players themselves use a sword or a projectile to kill a mob.

    Unlike other plugins that accomplish this, this plugin doesn't just track the last hit, and doesn't stop music discs from dropping.

    How it works:

    When players hit a creature with a sword, or with a projectile, the plugin tags and tracks the entity that was hit for a period of time, which is configurable by the server host (via the config file). If the mob dies within this window of time, it will drop items and experience normally. If the mob is not tagged and tracked by the plugin as being hit, it will drop nothing.


    Why did I make this?

    The server I work for has been using another anti mob farm plugin for some time. We had the following annoyances with it, all of which, my plugin addresses:

    • Mobs killed by Flaming Aspect damage immediately after a strike would not yield drops.
    • Some did not allow drops from kills with arrows.
    • Some did not distinguish between kills with arrows from players, mobs, dispensors.
    • Mobs killed by fall damage after a knockback would not yield drops.
    Since each of these required a duration-based combat tagging system, I decided that it would be best to write my own, this made it quite a departure from how our previous plugin worked. This addressed each of our issues with it, so we decided to use it on our server before dispenser-farms became a problem. Since we were using it for our server, and it only took about half an hour to write, I figured I would share it with bukkit.

    This sounds inefficient, you say?

    I can assure you that this is highly efficient. Combat tags are sorted into a single queue, and only a single Asynchronous event is running at a time, no matter how many mobs are in the queue. The queue itself will not overflow, and cleans itself up in the order that mobs were struck. If a mob is removed prematurely, the plugin will be able to carry on happily as though nothing happened.

    The timer system will not take up much memory, nor will it take up much CPU at all. This is a very lightweight method of handling this. Though it isn't as simplistic or lightweight as other plugins that do the same thing, the difference in performance is negligible, while the benefits of NoGrind are clear.

    Regrettably, there are known bugs:
    • Monsters damaged by potions will not be combat tagged. This is a bukkit bug.
    Future Additions:

    I will be writing two optional modules for this plugin.

    Module #1: Will allow server administrators to change what mobs drop, and the likelihood of the items dropping through customization of loot tables on a per-monster, per world basis.

    Module #2: Will interface with economy plugins to permit mobs to drop money, or to give money directly to the player.



    I will be writing several configurable options for this plugin:


    • Options to configure the amount of experience you get from each mob, modifiers for worlds, etc.
    • Experience per hit instead of on death (Optional)
    • Experience given to player directly, instead of dropped (Optional)
     
    BioRage likes this.
  2. Offline

    TheLimaBeanman

    Nice! I like this a lot. this i think gets rid of lag also from mob items dropping.
     
  3. Offline

    TerXIII

    We've spotted some experience bugs caused by minecraft's default limitations to experience gain. As such, we can only be more restrictive with experience, rather than more lenient, due to how minecraft was written.

    This can, and will be repaired in a later version, but I do not want to do it until I create the necessary behavior to allow server admins to create custom experience values per-mob. I'm at the mercy of my server admin's requests, so my programming time is dictated by what he feels is the next project.
     
  4. Offline

    obscurehero

    How is this different from no farm?
     

Share This Page