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

    CaiusTSM

    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.

    Features:
    • 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:
    SelfPlanting.jar

    Movie--------------------------------------------------------------------------------------------------------


    Changelog:
    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:
    http://forums.bukkit.org/threads/me...t-collect-items-and-power-redstone-953.20375/
     
  2. Offline

    kaasinees

    testing
     
  3. Offline

    CaiusTSM

    anything yet? edit: updated.
     
  4. Offline

    TheGoodRobot

    I'd like to see a better config file for this. Otherwise, great plugin. Bit confused though. I just want to allow this to happen with trees and nothing else. Should I set the timers to zero for other plants?
     
  5. Offline

    CaiusTSM

    says it above, but yes, if you set the planting time to zero, it will not plant that plant.
     
  6. Offline

    FurmigaHumana

    Code:
    2012-02-19 12:57:37 [WARNING] Could not properly handle event BLOCK_PHYSICS:
    java.lang.IllegalAccessError: Synchronized code got accessed from another thread: org.CaiusTSM.SelfPlanting.PluginLoop
        at org.bukkit.event.Listener.onBlockPhysics(Listener:0)
        at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1024)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:57)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:453)
        at net.minecraft.server.World.k(World.java:518)
        at net.minecraft.server.World.applyPhysics(World.java:506)
        at net.minecraft.server.World.update(World.java:467)
        at net.minecraft.server.World.setTypeId(World.java:439)
        at org.bukkit.craftbukkit.block.CraftBlock.setTypeId(CraftBlock.java:88)
        at org.bukkit.craftbukkit.block.CraftBlock.setType(CraftBlock.java:84)
        at org.CaiusTSM.SelfPlanting.Plant.tick(Plant.java:82)
        at org.CaiusTSM.SelfPlanting.PluginLoop.run(PluginLoop.java:59)
        at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    2012-02-19 12:57:37 [INFO] This error is logged only once: it could have occurred multiple times by now.
    2012-02-19 12:57:37 [INFO] Please contact one of the authors of plugin 'SelfPlanting': CaiusTSM
     
  7. Offline

    joselitoeu

    Cool, will test it asap. ;)

    Testing it right now =D

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

    Multikillers

    Can you not make so it only replant 1 sapling from every tree, plzzz i get so many big trees, but it is a really nice plugin
     
  9. Offline

    joselitoeu

    @CaiusTSM
    Tested, worked fine, planted all. =D
    Just some minor things:
    - In config its set to plant after 30segs, but it plant around 18 seconds, same if i set to 20seconds.
    - It dont selfplant during the night, or when the place has less than 9 lvl of light as you said, add a option in config to disable it please.(You should do this for all new implements, a option do disable or enable if possible.)
    Worked with all my plugins, no crash or conflict(till now at least).
    Thank you for updating this :D
     
  10. Offline

    CaiusTSM

    Thats great to hear, and about the timing being wrong, its wrong because I kept it that same as the old version, but this version is much faster, so I have to adjust it, which is not bad, but good because now I know that its faster, and about the day night thing, I might give a option for that.

    giving the error is great, but could you tell me what you were doing /screen shots or description.

    fixed timing.

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

    Junrall

    So far so good. There is one little odd thing... if a player dies and drops saplings... those saplings will plant themselves. Is this supposed to be that way?
     
  12. Offline

    CaiusTSM

    yes it is, because in real life if someone dies and drops seeds for example, over time those seeds would grow into a plant.

    if a sapling item is anywhere it will try to plant itself, so you could make a dispenser fire out saplings and those saplings plant themselves as a example, I made this plugin not only for deforestation, but also so you can make auto farms.

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

    kaasinees

    i also get BLOCK_PHYSICS errors.
     
  14. I get an error message:

    2012-02-22 18:07:07 [INFO] This error is logged only once: it could have occurred multiple times by now.
    2012-02-22 18:07:07 [INFO] Please contact one of the authors of plugin 'SelfPlanting': CaiusTSM
    2012-02-22 18:07:07 [WARNING] Could not properly handle event BLOCK_PHYSICS:
    java.lang.IllegalAccessError: Synchronized code got accessed from another thread: org.CaiusTSM.SelfPlanting.PluginLoop
    at org.bukkit.event.Listener.onBlockPhysics(Listener:0)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1024)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:61)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:460)
    at net.minecraft.server.World.k(World.java:522)
    at net.minecraft.server.World.applyPhysics(World.java:510)
    at net.minecraft.server.World.update(World.java:471)
    at net.minecraft.server.World.setTypeId(World.java:443)
    at org.bukkit.craftbukkit.block.CraftBlock.setTypeId(CraftBlock.java:88)
    at org.bukkit.craftbukkit.block.CraftBlock.setType(CraftBlock.java:84)
    at org.CaiusTSM.SelfPlanting.Plant.tick(Plant.java:136)
    at org.CaiusTSM.SelfPlanting.PluginLoop.run(PluginLoop.java:59)
    at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    2012-02-22 18:07:07 [INFO] This error is logged only once: it could have occurred multiple times by now.
    2012-02-22 18:07:07 [INFO] Please contact one of the authors of plugin 'SelfPlanting': CaiusTSM

    Would be very nice If you could help me :)
     
  15. Offline

    Kloporte

    Hi i get those nasty little errors
    Code:
    2012-02-23 23:27:32 [SEVERE] java.util.ConcurrentModificationException
    2012-02-23 23:27:32 [SEVERE]    at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
    2012-02-23 23:27:32 [SEVERE]    at java.util.AbstractList$Itr.next(Unknown Source)
    2012-02-23 23:27:32 [SEVERE]    at org.bukkit.craftbukkit.CraftWorld.getEntities(CraftWorld.java:500)
    2012-02-23 23:27:32 [SEVERE]    at org.CaiusTSM.SelfPlanting.PluginLoop.run(PluginLoop.java:33)
    2012-02-23 23:27:32 [SEVERE]    at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    2012-02-23 23:27:32 [SEVERE]    at java.lang.Thread.run(Unknown Source)
    I'm running the last RB of bukkit, and nothing special happend ingame at these moment.
     
  16. Offline

    stefa168

    Hey, interesting plugin! I try this now. Only an idea (I don't know if there is alerady in the topic)
    Maybe to make the plants grow quickly, instead of using the fertilizer directly, would not be enough to throw it on them?
    PS: I'm not very good at typing in english, sorry...
     
  17. Offline

    joselitoeu

    Hey @CaiusTSM

    As expected, the plugin isn't working in the new craftbukkit, are you updating?:D

    Code:
    [SEVERE] Could not load 'plugins\SelfPlanting.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: org/bukkit/event/player/PlayerListener
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:148)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:287)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:211)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:207)
    at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:183)
    at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:53)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:156)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.NoClassDefFoundError: org/bukkit/event/player/PlayerListener
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.CaiusTSM.SelfPlanting.SelfPlanting.<init>(SelfPlanting.java:27)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:144)
    ... 8 more
    Caused by: java.lang.ClassNotFoundException: org.bukkit.event.player.PlayerListener
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 27 more
     
  18. Offline

    CaiusTSM

    im waiting for 1.2 since there is a new tree type
     
  19. Offline

    joselitoeu

    So, as theres a new sapling type, and the bukkit API changed a bit as i know, hope you update soon ^^
     
  20. Offline

    Fluffgar

    CaiusTSM Is there a dev.bukkit.org page for Self-Planting yet?
     
  21. Offline

    eternia16

    Are you going to update the plugin?
     
  22. Offline

    CaiusTSM

    yes I am very busy as it is almost vacation, but then i will have time.
     
    Fluffgar likes this.
  23. Offline

    joselitoeu

    You should do it CaiusTSM =]
     
  24. Offline

    CaiusTSM

    I have currently traveled elsewhere, but when I come back on Thursday it is my top priority, I am also working a bit on it right now, but until Thursday I don't think I will have it done.
     
  25. Offline

    Junrall

    The following warning keeps spamming my log file:
    Code:
    2012-03-20 04:15:30 [WARNING] Could not properly handle event BLOCK_PHYSICS:
    java.lang.IllegalAccessError: Synchronized code got accessed from another thread: java.util.TimerThread
        at org.bukkit.event.Listener.onBlockPhysics(Listener:0)
        at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441)
        at net.minecraft.server.World.k(World.java:514)
        at net.minecraft.server.World.applyPhysics(World.java:502)
        at net.minecraft.server.World.update(World.java:463)
        at net.minecraft.server.World.setTypeId(World.java:435)
        at org.bukkit.craftbukkit.block.CraftBlock.setTypeId(CraftBlock.java:92)
        at org.bukkit.craftbukkit.block.CraftBlock.setType(CraftBlock.java:88)
        at me.itsatacoshop247.TreeAssist.TreeAssistBlockListener$Reminder1$RemindTask.run(TreeAssistBlockListener.java:775)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
    2012-03-20 04:15:30 [INFO] This error is logged only once: it could have occurred multiple times by now.
    2012-03-20 04:15:30 [WARNING] Could not properly handle event BLOCK_PHYSICS:
    java.lang.IllegalAccessError: Synchronized code got accessed from another thread: java.util.TimerThread
        at org.bukkit.event.Listener.onBlockPhysics(Listener:0)
        at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441)
        at net.minecraft.server.World.k(World.java:514)
        at net.minecraft.server.World.applyPhysics(World.java:502)
        at net.minecraft.server.World.update(World.java:463)
        at net.minecraft.server.World.setData(World.java:406)
        at org.bukkit.craftbukkit.block.CraftBlock.setData(CraftBlock.java:72)
        at me.itsatacoshop247.TreeAssist.TreeAssistBlockListener$Reminder1$RemindTask.run(TreeAssistBlockListener.java:776)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
    Also, I have tried to disable Sapling Replant by setting it to false... but after a restart Sapling Replant is set back to true.

    I'm running the latest version of TreeAssist and Bukkit Version 1.2.3-R0.3 (build #2073)
     
  26. Offline

    CaiusTSM

    I just updated so maybe it is now fixed because they changed event listening in newest snapshot, but tree assist as i know places the sapling on the floor, so it does not do the fall physics so it could be coming from that, but also from mine, if it is not fixed in latest snapshot I will try to fix it, but I am not sure were this error comes from.
    (in the latest update of this plugin I did not add jungle trees yet, I just wanted to first update it to the latest snapshot and then later add that, because some stuff changed in 1.2.3)
     
  27. Offline

    seanth

    I'm having problems with the plugin and am not sure if I'm just doing something dumb.

    CraftBukkit version git-Bukkit-1.2.3-R0.2-b2060jnks (MC: 1.2.3) (Implementing API version 1.2.3-R0.2)
    SelfPlanting.jar v 1.4 (from SelfPlanting.jar)

    Errors from console:
    13:50:33 [SEVERE] Could not load 'plugins/SelfPlanting.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
    at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:201)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:132)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:207)
    at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:183)
    at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:56)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:156)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:127)
    at java.util.jar.JarFile.<init>(JarFile.java:135)
    at java.util.jar.JarFile.<init>(JarFile.java:99)
    at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:189)
    ... 7 more
    Halp?
     
  28. Offline

    CaiusTSM

    changed hope its fixed, I am a bit confused as I never got a error involving the plugin.yml file
     
  29. Offline

    seanth

    I just downloaded the latest version and everything seems good.

    I'm so glad you updated this. I really love the idea of the plugin, but had to disable it due to the saplings trying to plant themselves in the dark problem. Now it sounds like that problem is fixed. Yea!

    Now if only trees could automatically drop saplings. :)
     
  30. Offline

    CaiusTSM

    look at to do list "spread mode"
     
  31. Offline

    seanth

    Just noticed an error. Everything seems to be running ok still, though:

    19:59:26 [SEVERE] java.util.ConcurrentModificationException
    19:59:26 [SEVERE]at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
    19:59:26 [SEVERE]at java.util.AbstractList$Itr.next(AbstractList.java:343)
    19:59:26 [SEVERE]at org.bukkit.craftbukkit.CraftWorld.getEntities(CraftWorld.java:521)
    19:59:26 [SEVERE]at org.CaiusTSM.SelfPlanting.PluginLoop.run(PluginLoop.java:33)
    19:59:26 [SEVERE]at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    19:59:26 [SEVERE]at java.lang.Thread.run(Thread.java:680)
    >
     

Share This Page