Inactive [FIX/MISC] creaturebox [0.8] - Mob Spawners become tradable! [1818]

Discussion in 'Inactive/Unsupported Plugins' started by Spathizilla, Jun 10, 2011.

  1. Offline


    Make creature spawners tradable
    Now with EnderDragons, Villagers, Blaze and more!

    Download v0.8 for CraftBukkit 1818 (Minecraft Beta 1.1) - See Note!
    For a Minecraft 1.2.5 version See this post: creaturebox dev-1.0

    Version 0.8 WILL NOT work with 1.1-R4+ or Minecraft 1.2.3!
    You must get the development version of creaturebox 1.0 at the link above

    Please use bukkitdev for all bug reports and support questions:
    creaturebox BukkitDev:

    creaturebox was originally created by Lodran and was first developed and deployed on our server when we wanted better control over spawners. creaturebox also fixes several issues with creature spawners, so that they can be altered, and traded between players.
    • Have you ever thought "I'd love to dig this dungeon out, and move it somewhere more useful."?
    • Have you ever thought "I'd really like to /give myself a spawner, and make it produce something other than pigs."?
    • Have you ever thought "I'd really like to turn this spawner on and off with a switch"?
    • Have you ever thought "I'd like these critters to spawn on something other than grass"?
    • Have you ever thought "I wish monsters would spawn in lit rooms too"?
    If you answered "yes" to any of these, then creaturebox is the plugin for you.

    • 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.
      • space - requires only an area to spawn mobs.
    • 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 Permissions, PermissionsEx, GroupManager and BukkitPerms.
    • A creature spawner can be turned off by powering it with redstone.
    • You can see what type of spawner you're holding with /creaturebox holding command.
    • 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.
    • 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.
    • showPlacements: {boolean, default false} - Shows the coordinates where spawners are placed or broken on the console.
    • 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.
    • The Mobs added to Minecraft 1.8 will not work with older versions of craftbukkit even with creaturebox for 1.8. Please do not post about it if you thought you were smart trying to get enderman spawners in minecraft 1.7.
    • You can trade mob spawners with shop plugins (like ChestShop) but you need the correct spawner type id for that creature. These ID numbers changed after craftbukkit build 1222 and also with craftbukkit build 1818. Use /iteminfo

    Version 0.8
    • Compiled against latest RB
    • Updated mobspawners to keep their types via Enchantments since Bukkit removed metadata on mobspawners
    • All 1.0 mobs added
    • New Config Option: legacydata: {boolean - default: false} - Allow the now broken metadata method to be used. Only works with very old craftbukkit versions
    Revision History (open)

    Version 0.7.8b
    • Added /cb holding command to tell you what spawner type you're holding - Spout support for this to be added
    • Old broken spawners which were not placed in the world during the id conversion process will now drop fixed ones.
    • New Config Option: showPlacements - Shows the coords of spawners being broken/placed in the console.
    Version 0.7.8a
    • Fixed NPE caused by the entity id changes when /cb set was used without a creature name.
    Version 0.7.8
    • Updated entity ids for craftbukkit 1240. This version will not work on earlier recommended builds
    Version 0.7.7b
    • Fixed a problem where mcMMO would cause multiple spawners to drop - Thanks to @daemitus for reporting this.
    Version 0.7.7a
    • TempFix: Disabled human monster spawners to prevent exception spam
    • TempFix: Human monster spawners will now spawn Zombies (until human monsters are fixed)
    • Added an error message if spawning of other mobs failed (with coords)
    Version 0.7.7
    • Added Cave_Spider spawners (id 15) - creaturebox.creature.cave_spider
    • Added Enderman spawners (id 16) - creaturebox.creature.enderman
    • Added Silverfish spawners (id 17) - creaturebox.creature.silverfish
    • Added native support for PermissionsEx
    • Added native support for GroupManager
    • Added Bukkit Permissions
    Version 0.7.6
    • Fixed an exploit where a spawner would drop under certain conditions when it shouldn't.
    • Fixed saving spawners logspam when the spawner placement was actually blocked
    • Filename of the JAR was changed to correctly be creaturebox.jar (Make sure to delete the old one)
    This exploit is present in all previous versions.

    Version 0.7.5
    • Made spawners of different types not stack - Credit to Nisovin for discovering this
    Version 0.7.4

    • Updated Permissions calls to remove depreciated methods
    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.
    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
  2. Offline


    Shame they might not allow custom craftbukkit builds then... but you could always ask them in support ticket?
  3. Offline


    ya i did and they added it for me since there wasnt an option for me to be able to add it and all. So far everything works just fine from what i can tell.
  4. Offline


    I'm suggesting something..

    Can you include all Mob Spawner in the World(scanning the mob spawner) and change all the attributes of that?
  5. Offline


    So what is this a lost plugin or what, no updates in a while... people are complaining that spawners dont keep their type, i also cant make enderdragon spawners
  6. Offline


    same with above, this bug is the same as the old updates (0.72) if I remember..

    all the text inside the spawner.yml suddenly disappearing.. no error or whatsoever..
  7. Offline


    Ever think about the feasibility of this?

    Player breaks spawner, remove drop, add directly to inventory, notate in a file somewhere that they have spawner:X.
    Remove the ability to drop spawners also, only place them.

    Basically, you track the metadata in a file, and since you dont have to track items on the ground, it should be a relatively simple operation. (Currently using a modified craftbukkit.jar personally).

    The only issue arises is multiple spawners held in an inventory. in which case, deal with it and keep placing them until you find the right one.
  8. Offline


    Good news!

    I've managed to work around Bukkit's slash n burn approach to mobspawners! Bukkit didnt listen to our pleas to keep metadata in inventory.

    Version 0.8 (which I'm currently testing on 1.1) is keeping mob types in inventory again without the need for any custom craftbukkit versions. There is a new config flag to enable the old style methods IF you still use some crazy old craftbukkit version.

    * custom item names (ie Zombie Spawners are called exactly that) for Spoutcraft users will be delayed due to the new metadata method.
    * mob spawners in chests/player inventory when you update to 1.1 (from my custom craftbukkit) will no longer work. They need to be placed. Unplaced ones will revert to pig spawners like with 1.0.1

    For those of you desperate for the 0.8 development version: Download here
    Read this:
    * Compiled against craftbukkit 1718 (Minecraft 1.1)
    * Untested on craftbukkit 1597 (Minecraft 1.0.1) but *might* work.
    * Stacking mechanic not updated so they'll only allow stacks of 1
    * If you do not have creaturebox already installed, do not use this - it wont write the config.
    * You will need to add "legacyData: false" to your config.yml as I haven't put that in yet.
  9. Offline


    This is indeed good news! Glad you were able to find something for it.

    I was just thinking how annoyed I am with Bukkit about their lame change to spawners.

    Spawners are a huge part of our servers economy, and we almost were ok with loosing them for 1.1. Then I saw this post. Excellent.
  10. Offline


    I was very annoyed too and almost didnt bother trying to work around it.

    However it appears to work fine in this way. The downside is mobspawners in chests are not supported as they will not have their new data set. Unfortunately I still cannot do anything about that bit.
  11. Offline


    oh, like old ones?
  12. Offline



    Any spawners sitting in the world as blocks are fine.
    Any spawners in chests or player inventory will revert to pig status due to craftbukkit.
  13. Offline


    Hey Spath, you mentioned another version? Where could I catch a link. Gonna install it right now.
  14. Offline


    Same url, I've just copied it over the old one.
  15. Offline

    Celtic Minstrel

    How'd you do this... reflection to access the n.m.s.ItemStack field directly? Or storing it in your own data structure?
  16. Offline


    From memory, since my dev machine with my code on is toast atm:
    Itemstack.addUnsafeEnchant() of type Oxygen
    Then used the old mob ids from 0 to (err) 22 for the "amount" of enchant.

    On placement it swaps the spawner to the correct type.
  17. Offline

    Celtic Minstrel

    Ah, so it's actually the same method I had in mind, more or less.
  18. Offline


    I left the metadata method in there for legacy purposes too. Just in case Bukkit stop this crazyness.
  19. Offline

    Celtic Minstrel

    Well, the method I had in mind was to add metadata alongside enchantments (to be stored as a sibling tag to the "ench" tag", but there's no API for that, so adding data as enchantments is pretty similar.
  20. Offline


    Yeh I wish there was a better way to keep the spawner types which are already in chests but without scanning the world and converting them, I foresee them always reverting to pig the second they hit player inventory.

    creaturebox 0.8 is out using enchantments since I've had no problems with them..

    compiled against craftbukkit 1818

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 16, 2016
  21. Offline


    This plugin is broken again, will not allow users place spawners even with the correct permissions (Has not changed since 1.7). The spawner also does not retain its creature type. This should be a simple fix if you already have the code.
  22. Offline


    I think in 0.8.1 I'm gonna add the option to remove mobspawners entirely and use the spawn eggs. Then you throw one at a redstone torch (or some other block) to spawn a mobspawner of that type.

    Makes life easier than enchantments.

    Opinions, please?
    illusive101 likes this.
  23. Offline


    So I cant place nor can anyone on my server with permission nodes can not place any spawner. they all break and turn into pig ones. And you can not pick it up using silk touch it still does not retain the mob type at all.

    IS there seriously any way to fix this?

    Also for the eggs I have already spoken to members of my server and they like having the mob spawners but they need to work cause other wise im stuck going around all day fixing spawners left and right which is tiring.

    I would like to have it properly working on 1.1 even if it takes silk touch to pick them up but be nice to actually place them back down without them breaking.

    If I am not understanding how to go about retaining the mob type please let me know! I would appreciate it
  24. Offline


    The give command only gives pig spawners, hopefully this can be looked at soon :)

    Unless I'm doing something wrong.

    Other than that, thanks for the awesome plugin!

    This would be absolutely amazing, it would allow me to give donators their spawners automatically (with buycraft) and not have to manually send spawners to everyone.

    Thumbs up!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 16, 2016
  25. Offline


    fixed XD
  26. Offline


    I knew I forgot to update something. Yeh it wont be setting the enchantment.
  27. Offline


    what enchantment? This is confusing me for one and for two will it be fixed for 1.1 to retain the original mob type once dropped and placed?
  28. Offline


    v0.8 is already fixed for that.

    Only /cb give is broken.
  29. Offline


    Im just not sure that the enchantment is your talking about lol and Im reinstalling V 0.8 to see if it will work for us :)

    Will shops still sell them properly?

    ok i think your getting something confused in your own plugin.

    /cb give works fine for me

    but once i place it, it automatically turns into a pig spawner. but it drops with its original type as well so the only thing thats broken is placing it from what i have seen on my server.

    Also when you buy spawners from a shop such as the admin shop it autoturns into a pig spawner as well so it is no longer selling the correct ones they are all pig spawners now....

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 16, 2016
  30. Offline


    No, I'm not getting something confused - I know exactly what is happening.

    While the command works, it gives you a spawner which, because of Bukkit being lame, converts back to pig because of the metadata being cleared. The command isnt using the new format I made for spawners to work again while in inventory.
  31. Offline


    ah gotcha. was kind of confusing. hopefully it will get sorted soon! <3 this plugin! or perhaps another cb version that is fixed like before perhaps or something. lol thanks for clearing it up

Share This Page