[INACTIVE][FIX/MISC] creaturebox v 0.7.3 - Wolves and Monsters and Critters, Oh My! [684]

Discussion in 'Inactive/Unsupported Plugins' started by Lodran, Mar 2, 2011.

  1. Offline

    Lodran

    creaturebox
    Make creature spawners tradable
    Now with Wolves, Monsters, Slimes and Giants!

    Download version 0.7.3 for CraftBukkit 602, 617, 670, 684
    Downloads for old (unsupported) versions (open)

    • Have you ever thought "I'd love to be able to dig this dungeon out, and move it somewhere more useful."?
    • Have you ever thought "I'd really like to be able to /give myself a spawner, and make it produce something other than pigs."?
    • Have you ever thought "I'd really like to be able to turn this spawner on and off with a switch?"
    If you answered "yes" to any of these, then creaturebox is the plugin for you.


    creaturebox fixes several issues with creature spawners, so that they can be altered, and traded between players.

    Features:
    • When a creature spawner is broken, it is dropped as an item.
    • When a creature spawner is placed, it retains its original creature type.
    • The creature type which is created by a creature spawner can be changed using the /creaturebox set command. To alter a mob spawner, look directly at it (through glass is fine), then type /creaturebox set {creaturename}, where {creaturename} is the name of a creature. Valid creature names are: pig, chicken, cow, sheep, squid, creeper, ghast, pig_zombie, skeleton, spider, zombie, slime, monster, giant and wolf.
    • The frequency at which a creature spawner generates creatures can be changed using the /creaturebox period {period} command, where {period} is the number of seconds between spawns. A period of -1 gives a random period between 10 and 20 seconds. A period of zero puts the creature spawner into "pulsed redstone" mode, where creatures are generated only when the redstone power of the spawner switches from high to low.
    • The number of creatures generated at a time can be changed using the /creaturebox count {count} command, where {count} is the number of creatures to generate. A count of -1 generates a random number of creatures (from 1 to 4), while a count of 0 disables the spawner.
    • The maximum number of live mobs that a spawner will maintain can be changed using the /creaturebox limit {limit} command, where {limit} is the desired maximum. A limit of -1 sets the default, which is 10 for a managed spawner, and unknown for a natural spawner.
    • The requirements for spawning a creature can be adjusted using the /creaturebox requires {requirements} command, where {requirements} is a space separated list any number of:
      • player - require a player to be within 20 blocks of the spawner.
      • surface - require grass for critters.
      • light - require light for critters, dark for monsters.
    • A creature spawner's settings can be displayed using the /creaturebox info command.
    • A creature spawner can be given to a player using the /creaturebox give {player} {creaturename} {count} command.
    • Supports the Permissions API. If Permissions (or GroupManager/FakePermissions) is not available, uses the player's Op status to determine its behavior.
    • A creature spawner can be turned off by powering it with redstone. Note: this will not affect the spawning of invincible "Ghost pigs".
    Permissions:
    • creaturebox.set - Allows use of the /creaturebox set command.
    • creaturebox.give - Allows use of the /creaturebox give command.
    • creaturebox.creature.{creaturename} - Allows the player to set or give {creaturename} spawners, where {creaturename} is a valid creature name (pig, cow, etc...).
    • creaturebox.period - Allows use of the /creaturebox period command.
    • creaturebox.count - Allows use of the /creaturebox count command.
    • creaturebox.limit - Allows use of the /creaturebox limit command.
    • creaturebox.requires - Allows use of the /creaturebox requires command.
    • creaturebox.dropspawner - When a creature spawner is broken, it is dropped as an item.
    • creaturebox.placespawner - When a creature spawner is placed, it retains its original creature type.
    Configuration:
    • creaturebox now creates a config.yml file in .../Plugins/creaturebox.
    • debugPriority: {integer range 0-3, default 2} - Sets the "noise level" for debugging messages - lower numbers = less noise. In general, you can ignore this because you have to set yourself as a debugger to see debugging messages.
    • messagePriority: {integer range 0-3, default 3 } - Sets the "noise level" for messages which are displayed when a player types a command.
    • enableRedstone: {boolean, default true} - Enables or disables redstone control of creature spawners.
    • operatorPermissions: {boolean, default true} - Enables separate operator permissions. If set to false, players are given the same permissions as operators. This setting will do nothing if a permissions plugin is installed.
    Notes:
    • creaturebox runs spawners in two different modes. "Natural" mode, where the spawner is run entirely by minecraft (and thus won't stop working, or change behavior when the map is loaded on a vanilla server), and "Managed" mode, where the spawner is run entirely by creaturebox. A spawner is switched to managed mode if any of its settings are changed from default. Squid, Slime, Monster and Giant spawners are always run in managed mode.
    • It is now possible to defeat the invincible "Ghost Pigs". Change the grass in a 9x9 area under the spawner to something else (green wool would work nicely) which would stop pigs from spawning entirely. Then, look at the spawner, and type /creaturebox requires player light to allow the pigs to spawn on the wool.
    Credits:
    Latest Revisions:

    Version 0.7.3
    • Added creaturebox.period, creaturebox.count, creaturebox.limit and creaturebox.requires permissions.
    • The source code for creaturebox is now included within the .jar.
    Revision History (open)
    Version 0.7.2
    • Managed spawner settings for multiple worlds (spawners.yml) are now loaded correctly.
    • A new configuration setting (operatorPermissions:) has been added to config.yml.
    Version 0.7.1
    • spawners.yml is now written whenever a spawner is modified.
    • Added exception handling to the code that reads spawners.yml.
    • Spawners are now removed from the managed spawners list when their block is broken (or otherwise changed).
    • Added (experimental) code to stop spawners from being run if their chunk is unloaded. This code needs more testing, as it appears that checking to see if a chunk is unloaded may be causing it to load.
    Version 0.7.0
    • Enabled all of my "experimental" features.
    • The frequency at which mobs are generated can be changed (see /creaturebox period).
    • Spawners can now be "pulsed" with redstone, to generate 1 or more mobs each time a button is pressed (see /creaturebox period).
    • The number of mobs generated each time can be changed (see /creaturebox count).
    • The total number of mobs that a spawner will create at a time can be changed (see /creaturebox limit).
    • Some of the requirements for spawning a mob can be relaxed (see /creaturebox requires).
    Version 0.6.3
    • Fixed default permissions for wolf spawners.
    • Fixed spawning for squid spawners.
    Version 0.6.2
    • Worked around a bug in bukkit which was causing all spawners to be placed as pig spawners.
    • Added support for wolf spawners.
    • Enabled experimental code which improves the spawning requirements for sqiud spawners (Note: to activate this code you have to use the /creaturebox set squid command on the spawner. Existing spawners and those placed from inventory still use the old code).
    Version 0.6.1
    • Updated to support CraftBukkit build 602. Note: creaturebox is not compatible with CraftBukkit build 600.
    Version 0.6.0
    • Rewrote the plugin from scratch, to make way for new features.
    • Replaced right-click selection of mob spawners with "where I'm looking" selection.
    • Added /creaturebox info command, which tells the player a creature spawner's settings.
    Version 0.5.1
    • Added /creaturebox access command, which tells the player what access they have.
    • Updated to support craftbukkit 522/bukkit 450
    • Removed the Slime creature type - slime spawners don't work as is.
    Version 0.5
    • Added the ability to turn spawners on and off with redstone.
    Version 0.4
    • Altered creaturebox.attachPermissions in an attempt to gain compatibility with Permissions version 2.1.
    Version 0.3
    • pig_zombie spawners now break correctly.
    Version 0.2
    • Changed /creaturebox {creaturename} command to /creaturebox set {creaturename}.
    • Changed creaturebox.changespawner permission to creaturebox.set.
    • Added /creaturebox give {player} {creaturename} {count} command.
    • Added per-creature permissions.
    Version 0.1
    • First Release
    To Do:
    • Adjust event priorities (Destroying a spawner in a protected area copies the spawner).
    • Looking for suggestions
    Features I'm considering:
    • Mobs riding mobs.
    • Per-server or per-world spawn limits.
    • Angry Wolves.
    • Rainbow sheep.
    Things I can't do anything about:
    • As of MineCraft 1.4, Spawners don't show damage when they're in your inventory. Sorry, Notch "Fixed" this.
    • As of MineCraft 1.4, if you pick up a pig spawner, and follow it up by picking up a wolf spawner, you'll end up with two pig spawners. This is caused by the above "damage" fix, and until bukkit adds inventory hooks, nothing can be done about it.
     
    cybercrash and PedoHascookies like this.
  2. Offline

    Miauw62

    Its not only pigs, there also are immortal ghost slimes, and using hey0, i also had invincable creepers and spiders, that dont do anything, but just lay around. i call it dummies.

    OT: Very nice plugin, i can use this, i think.
     
  3. Offline

    Celtic Minstrel

    It sounds like you can see the plugin.yml file, which means that you unzipped the jar, which you should not have done. Presumably this means you're using Mac's built-in archive helper, which is a bit overzealous on that point. Try downloading and installing The Unarchiver and then unzip the zip file; you should get a single .jar file out of it, which goes in your plugins folder.
     
    Noahax likes this.
  4. Offline

    imaxorz

    Can this be used to turn ALL spawners off?
     
  5. Offline

    Lodran

    Sorry, but no.

    It's not quite what you're asking for, but you might find MobControl useful.
     
  6. Offline

    imaxorz

    I am using a plug that lets mobs drop money, but I don't want players money farming using spawners, so I was looking for a way to disable them.

    I guess I will just use MCEdit or similar to delete them all from my map.

    Thank you though.
     
  7. Offline

    Devilyoda

    question about how the redstone works with the spawner. i ran some red stone directly at the spawner and put it on a switch, but it did not stop spawns from coming out. any idea what i am doing wrong? or can u post a video of it?
     
  8. Offline

    Lodran

    Power the redstone to disable the spawner. (I know, it's backwards, but there's no easy way to detect if unpowered redstone is connected to a block.)
     
  9. Offline

    Celtic Minstrel

    Well, you could manually check all adjacent blocks where the wire could be. I think that would be at least six checks per spawner though. I dunno if that's too much.
     
  10. Offline

    aaronify

    The players on my server are getting two spawners back when I destroy one. Any idea why this could be? I am using otherblock as well, but removed the section to cause a spawner to drop (so the duplication isn't from there)

    Also, a request: can we add a permission to disallow the redstone control? I'm trying to run my server as low invasive as possible, and don't want to add any non-vanilla redstone functionality.

    Great mod tho! I was looking for something like this =D

    EDIT: I also see health bars on some of the spawners. Is that supposed to be there, and if so, any idea why only some of them have the bars?
     
  11. Offline

    Celtic Minstrel

    My guess would be that that's a side-effect of the way the plugin remembers what type of mob they spawned; since Minecraft doesn't assign any special meaning to damage on a mob spawner, it displays it as a health bar.
     
  12. Offline

    Lodran

    Celtic Minstrel guessed right - I use the item's damage level to hold the spawner's type while it's an inventory item, because for whatever reason, the normal "item data" method wasn't working. When you place it, everything about it goes back to normal.

    As for a second spawner dropping, I'd have to guess that another plugin is causing that, and further I'd guess that one drops with a health bar (indicating that it's a monster spawner), and one without a health bar (i.e. a pig spawner).

    Currently there's no way to turn off redstone control - once I add a configuration file, I'll add that (probably as a per-world setting).
     
  13. Offline

    anon

    Could u add the spawner of the "monster" mob, the one with player skin?

    I thought bukkit didnt allowed them, but a day ago, I found a "monster" mob spawner that I placed on old Hmod times, and they still worked!

    http://www.minecraftwiki.net/wiki/Human
     
  14. Offline

    Lodran

    Like slimes and giants, bukkit doesn't prevent them, but doesn't really understand them either. I'm guessing it can only be done by going behind bukkit's back, and talking to the underlying (somewhat obsfucated) minecraft.net classes instead.
     
  15. Offline

    mbsuperstar1

    I'd just like to thank you for making my future adventure map progress possible! I've had some fun experiences with a creeper spawner and it was an overall interesting experience. [​IMG]

    One suggestion would be a toggle-able message in the chat to tell me whether the spawner has been de-activated or activated with redstone as it can be quite annoying to figure out with them spawning. [​IMG]
     
  16. Offline

    Lodran

    I've found that putting a redstone torch directly underneath the spawner does a fine job of disabling it, but like most other circuits, to hit it from the side, you have to connect the torch with a wire.
     
  17. Offline

    mbsuperstar1

    That makes a lot of sense thanks, should help me out in future cases.
     
  18. Offline

    Celtic Minstrel

    I notice that this does not support the giant zombie mob or the human mob. I'm guessing that's out of a desire to stick to the Bukkit API? Or is there some other reason you've omitted them?


    Anyway, now that I've gotten around to trying it, I have to say that I quite like it. Might be good to have an option to turn off the "dropped/placed spawner" messages, and add a shorter alias for the command, but apart from that, it's pretty good.
     
  19. Offline

    Lodran

    Yeah, giants, humans and slimes all have problems within the bukkit api. Bukkit doesn't have a creature type for giants or humans, and the spawning requirements for slimes seem to be keeping slime spawners from working either.

    I'll probably add them in at some point, but I've got to get some kind of permanent storage going for per-spawner settings first.
     
  20. Offline

    Piggysan

    None of my spawners are working, I've installed the plugin correctly and have no errors.
     
  21. CB 556 here. It works, but when i try to turn a switch to power it on/off, this does not work. I tried your method by putting a redstone torch directly underneath it but to no avail... Maybe do a screenshot of your setup?
     
  22. Offline

    EverShort

    Wait so i installed this mod put it in the plugin folder i can create all of the spawners but nothing spawns am i doing something wrong? its a dark room i put a zombie spawner but nothing pop's out "Using bukkits latest update 0.0.1"
     
  23. Offline

    Avous

    i have a request.... could you have it so MONSTERS have a small chance to drop their designated monster spawner? as in at night if i go out hunting skeletons they have a 5% chance to drop a skeleton monster spawner? or just a monster spawner?
     
  24. Offline

    Celtic Minstrel

    @Avous - For that, you want Otherblocks. When specifying drops in that plugin's config file, you would set the "color" according to the following list to indicate the type of mob spawner you want:

    0 - Pig, 1 - Chicken, 2 - Cow , 3 - Sheep, 4 - Squid, 5 - Creeper, 6 - Ghast, 7 - Zombie Pigman, 8 - Skeleton, 9 - Spider, 10 - Zombie, 11 - Slime

    So, for example:
    Code:
    otherblocks:
      CREATURE_CREEPER:
       - tool: ANY
         drop: MOB_SPAWNER
         color: 5
         chance: 5
    That would make Otherblocks cause Creepers to drop Creeper Spawners with a 5% chance.
     
    Avous likes this.
  25. Offline

    Avous

    thank you!
     
  26. anyone got a redstone circuit to turn on/off a spawner? if so, can you post your setup?

    i tried a simple lever connected via redstone to a squid spawner but it do not stop the spawner when powered. i tried with a redstone torch directly under the spawner like someone posted before but to no avail...

    craftbukkit 556 recommended build...
     
  27. Offline

    zeph

    What about adding in support for adjusting:
    Spawn Radius (default radius is 4 blocks forming a 9x9 square)?
    Spawn Frequency (default is every 20 seconds)?
    Spawn Quantity (Default is something like 1-5 mobs)?
     
  28. Offline

    Dave Wright

    The dirt/grass around issue I'm now experiencing, having not before, I'm guessing as dirt is within 'x' radius to said spawner, if I replace the dirt with gravel, will that fix the issue ? Also do you know the exact radius so I can work out exactly how far our I need to go, for removing the dirt/soil, as I'd rather not remove all the soil as I'm using it with flowers for part of the decoration and it fits with the theme.

    I do realise you can do nothing to stop them spawning, just trying to find a way to restrict the number of pigs wandering around :)

    Ahhh 4 block radius looking at the post above me, but that doesn't fit with the pigs that are spawning, am I missing something ?
     
  29. Offline

    Lodran

    The spawn area for a spawner is a 9x9x3 box centered on the spawner. Ghost pigs will seek out and spawn in any block in that area which fits the following requirements.

    1) Air (i.e. a "breathable" block) above the block being considered.
    2) Air in the block being considered.
    3) Lighted grass below the block being considered. I'm not sure about dirt.

    When I say "Seek out", I mean it - the instant a block fits the requirments, 1 or more ghost pigs will spawn in it. The only way to prevent them from spawning is to remove the blocks that they would spawn on.

    My best suggestion is to rock up the entire area under the spawner, relog, and then experiment with the decor until you see pigs appearing.
     
  30. Offline

    Dave Wright

    A little play around this morning (realised I hadn't taken into account the grass on the other side of a wall) and hey presto zero pigs now ! I did then panic when I saw a pig, until I realised I could kill it :)

    Great addon ! going to be interesting to see what people make of when they go into the project I'm using them in :)
     
  31. anyone?
     

Share This Page