Inactive [MECH] Self Planting v1.4 - self planting plants [1.2.5-R2.0]

Discussion in 'Inactive/Unsupported Plugins' started by CaiusTSM, Jul 17, 2011.

  1. Offline


    Self Planting - self planting plants.
    Version: v1.4

    This plugin allows you to make saplings, cactus, and sugar cane automatically plant themselves after a certain amount of time. You can configure the planting time for each plant in the config file (default 30 seconds). If you set the plant time to zero, that plant will not plant itself.

    Note: Currently sugar cane requires a block of water next to it, not diagonal like normal sugar cane.

    • Make saplings plant themselves.
    • Make cactus plant themselves.
    • Make sugar cane plant itself.
    • Make seeds plant themselves.
    • Configurable times for planting.
    • Configure which plant can plant itself.
    • Configurable how many plants can countdown at once. (plant limit)
    Download the jar:


    Version 1.0
    • plugin released!
    Version 1.1
    • added: seeds plant themselves.
    Version 1.2:
    • fixed errors.
    • code is more memory efficient.
    Version 1.3:
    • configurable how many saplings can be counting down at one time. Suggest leaving as default unless you have a great CPU.
    Version: 1.4:
    • re-coded plugin.
    • now supports different kinds of saplings.
    • plants now need a light level >= 9 to plant themselves.
    • bug fixes.
    To Do List:
    • Different types of trees.
    • Sugar cane can plant itself with water diagonal to it.
    • Spread Mode: trees over time die, and spread saplings (other plants too?).
    • Mushrooms plant themselves.
    • Flowers plant themselves.
    If you get any errors please tell me.

    My other plugins:
    Item Scanner:
  2. Offline


    @pegasus :/ That doesn't sound good.

    Have I stumbled upon a major flaw in Craftbukkit 1000 then? Not the plugins.
  3. Offline


    I'm not sure if CB1000 isn't protecting itself properly or if one of your plugins is just misbehaving. In any case, pull out MineBackup and see if it improves.

    Quick and dirty hack, but it works. If you use long planting delays and/or your server is overloaded, the planting might take *slightly* longer than you specified. But it reloads clean. - v1.4.2 tested working on CB1038. Source included.

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


    @pegasus Well that's really odd. I took out MineBackup but it didn't seem to have any effect on the problem. Then at 1 fps I managed to get a distance away from where I'd spawned and the problem cleared up. Got closer and it came back. Then stayed away for a bit and returned and now it's fine.. So far. Did something despawn? I have no idea what else it could be or why (or how) that and MineBackup could conspire to create such a problem in the first place.
  5. Offline


    A friend of mine pointed out that you can manually plant trees on tilled soil. Added to the plugin. v1.4.3 -- same URL.

    Possibly you had a mess of spawned items laying around on the ground and SelfPlanting 1.3 wasn't letting them despawn? did you upgrade to 1.4+?

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


    @pegasus Yes, I'm using your upgrade now and was when the problem fixed itself. I didn't see them but it's possible there were quite a lot of saplings nearby as I was collecting wood earlier on.
  7. Offline


    Well hooray for beneficial side-effects. :)

    Sooo... Still playing with the source of this thing... I've just compiled up and posted (same URL) v2.0 (unofficial of course) sporting YAML configs and auto-planting torches, mushrooms (both colors) and flowers (also both colors). Set the planting delay to zero (0) to disable the auto-planting of that particular thing. I'm probably not done messing with this, FYI.

    @CaiusTSM : If you're still alive, we should talk code.

    EDIT: If anyone's wondering, the torches thing was added as a request from a friend of mine, and the mushrooms and flowers just made sense to me, so I threw them in. With the amount of changes I've made to this source, it makes me wonder if I shouldn't just fork it into another project where anything in the configuration file can turn to a solid object after a delay. Imagine throwing glowstone around. Or fly mod with a stack of cobble to build castles.

    Also of interest, I'm pretty sure that throwing down a mushroom in a place where it's too bright to grow will cause it to plant and uproot itself until it randomly wanders into a dark corner. I thought about making it just not plant unless it's in a dark enough place, but I like the idea of wandering mushrooms, so I left it as it is. Feedback on that is welcome.

    EDIT2: I'm currently watching a mushroom on my server and it's not uprooting itself. I'll keep an eye on it and see what happens and edit this post again. :D

    EDIT3: Looks like they only uproot when a block next to them changes. So they won't wander much. Still neat that they just move instead of dropping and vanishing. :)

    EDIT4: Thrown/dropped torches now prefer to stand on the ground, if possible.

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


    I am going to work on this plugin when I get time :), but before this plugin I want to work on my other one.
  9. Offline


    Um @CaiusTSM and @pegasus got another strange error... It seems to be something to do with this mod. I could be wrong.

    Attached Files:

  10. Offline


    yes i have noticed that error and fixed it.
  11. Offline


    Yeah, I had that error pop up once, but only once, and never did bother looking into it as I figured it was a fluke one-off. Looks like Caius has it sorted, though, so there's that. Let's just hope he releases an update before it gets too annoying. ;) Should be rare anyway, tag me again if it happens often.
  12. Offline


    @CaiusTSM and @pegasus Nevermind. I think most of the weirdness wasn't actually the server itself but ShockAhPI r6 in the client having a strange reaction with Bukkit. Reverted to r5 and seems to be okay now. Think the error I posted may have just happened to occur at the same time. Sorry to bother you two.
  13. Offline


    plant limit?
  14. Offline


    I really love your plugin! Please keep working on it! I am looking forewards to the spread-feature! This will be awesome as Nether!
  15. Offline


    i think u have a memory leak or something like tht. and i know its not my other plugins because ive tested them all. i keep getting this msg occasionally

    2011-09-04 07:46:34 [SEVERE] Exception in thread "Thread-5"
    2011-09-04 07:46:35 [SEVERE] java.lang.OutOfMemoryError: unable to create new native thread
    2011-09-04 07:46:35 [SEVERE] at java.lang.Thread.start0(Native Method)
    2011-09-04 07:46:35 [SEVERE] at java.lang.Thread.start(Unknown Source)
    2011-09-04 07:46:35 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftWorker.<init>(
    2011-09-04 07:46:35 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftThreadManager.executeTask(
    2011-09-04 07:46:35 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftScheduler.processTask(
    2011-09-04 07:46:35 [SEVERE] at
    2011-09-04 07:46:35 [SEVERE] at Source)

    and then a whole bunch of cant keep up
  16. Offline


    Is this plugin being maintained?
  17. Offline


    @Fluffgar: I'm still tinkering with my version of it. It has some issues, but I still bang on it regularly.
  18. Offline


    plz tell me this works in 1337

    this thing iscrashing after a long time and crashes whole server. i think it fills my ram

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



    is it right that you can't break planted blocks?

    yup, works for me. Except for the problem above

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


    i stil have this problem
  21. Offline


    Please, update this:
    -Different types of trees.

    The plugin is great! But is making the pine and white wood forests disappear.
  22. Offline


    still have his problem
  23. Offline


    Can't you make a quick update of this?
  24. Offline


    i run into a bug where all the saplings plant around the base of the tree (this is normal) then randomly it seems to duplicate the entities up until the server casues clients to f=run at something like 1 FPS (or lower) and the Server CPU is run 100%

    if i go into MCEdit i can delete all these entities then its fine but it is annoying, idk if its an issue with your plugin or minecraft itself

  25. Offline


    This plugin is dangerous...
    I used it for 2 days, it spawned more saplings than it was trees from the beginning.
    After a while it spawned an uncountable ammount of saplings around one tree, and made my server lag very much.
    Opened MCEdit and removed them, the server was working again!

    Please fix this or you should not upload this plugin anymore, took 3 hours for me to find what was lagging the server and lost some members because it's a new server and i got a bad reputation as a admin for not being able to fix it.
    Had been lagging all the time while i was sleeping and woke up with complains...


    Got the same problem as him
  26. Offline


    ive seen the same sor tof bug before with a plugin and Signs (they spew out dupes of signs) anyways, i think even a simple thing of if the sappling fails to plant it might delete (configurable i suppose) or have a detection of some sorts if there is too many sapplings in an area some shud be deleted (culled etc)

    just some ideas

    probably the bets idea is to find out why they duplicate when they fail to plant (this happens when a dense group of trees has sapplings trying to plant on the same block as the trees i believe)
  27. Offline


    @CaiusTSM I got an issue with concurrency:
    Show Spoiler
        at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
        at java.util.ArrayList$ Source)
        at com.bergerkiller.bukkit.nolagg.Util.fillEntities(
        at com.bergerkiller.bukkit.nolagg.StackFormer.stackNear(
        at com.bergerkiller.bukkit.nolagg.NLEntityListener.onItemSpawn(
        at org.bukkit.plugin.RegisteredListener.callEvent(
        at org.bukkit.plugin.SimplePluginManager.callEvent(
        at org.bukkit.craftbukkit.event.CraftEventFactory.callItemSpawnEvent(
        at net.minecraft.server.World.addEntity(
        at net.minecraft.server.World.addEntity(
        at net.minecraft.server.Block.a(
        at net.minecraft.server.Block.dropNaturally(
        at net.minecraft.server.Block.b(
        at net.minecraft.server.BlockFlower.h(SourceFile:37)
        at net.minecraft.server.BlockFlower.doPhysics(SourceFile:28)
        at net.minecraft.server.World.k(
        at net.minecraft.server.World.applyPhysics(
        at net.minecraft.server.World.update(
        at net.minecraft.server.World.setTypeId(
        at org.bukkit.craftbukkit.block.CraftBlock.setTypeId(
        at org.bukkit.craftbukkit.block.CraftBlock.setType(
        at org.CaiusTSM.SelfPlanting.SelfPlanting.plantAction(
        at Source)

    I suspect that you are using an async task to place the saplings/flowers. If this is the case, please change this to a synchronized (repeating?) task.
  28. Offline


    Will there be a Self Planting for the stable dev build of Bukkit (for Minecraft Server 1.0.1) soon?
  29. Offline


    i dont mean to throw dirt on this plugin (i really like this one) but until its updated i have been using TreeAssist

    it is better than this one in very small ways (such as correct saplings)

    and it also has the easy woodcutting, cutting the base drops all the wood

    but does lack alot that this plugin offers, like cane, seed replanting automatically

    ill be waiting on this plugin too though
  30. Offline


    Yeah, im using it to while this one dont update. But i like more of this plugin, its more realistic.
  31. Offline



Share This Page