[MISC/FUN] Appleseed - Plant apple trees! Not your standard apples from leaves plugin!

Discussion in 'Inactive/Unsupported Plugins' started by redsgreens, May 19, 2011.

  1. Offline

    redsgreens

    Appleseed is now on dev.bukkit.org! Go there for the latest versions, a dedicated support forum, and ticket tracking system: http://dev.bukkit.org/server-mods/appleseed/


    Appleseed - Plant trees that drop apples on the ground (or other items!):
    There are other plugins out there that make trees drop apples/items when you break the leaves, but this plugin doesn't do that. With Appleseed, all existing trees are left as-is. To get an apple tree, you must use a hoe to create soil, then right click the soil with an apple in hand. Done correctly(and if you have permission), a sapling will appear in the soil. When the sapling grows(use bonemeal to speed this up), the tree will drop apples on the ground.

    Features:
    • Plant items in soil(aka farmland) and grow a tree that drops that item on the ground
    • Config file that controls allowed types of trees, item drop interval, and likelihood
    • Permissions to control who can plant trees(and what type)
    Download Appleseed: http://dev.bukkit.org/server-mods/appleseed/

    Fertilizer: If trees have the setting "RequireFertilizer" set to "Yes", then they will stop dropping items and require bonemeal as fertilizer to continue. To fertilize a tree, hold bonemeal in your hand and right-click on the very bottom block of the trunk. Fertilizing more than once doesn't hurt, neither will fertilizing while a tree is still dropping items.

    Signs: If a player has permission, they can place a sign on a planted tree that reads "[Appleseed]". The sign will show the type of tree it is, and the color of the text will indicate it's status. If the text is light blue, the tree is an "infinite" tree and will never require fertilizer. If the text is green, then the tree is healthy and dropping items. If the text is red, then the tree requires fertilizer before it will continue dropping items.

    Config File: Remember, the config file is a YAML file, so the indentation is significant.
    • DropInterval: This determines how often items might drop. The default is 60 seconds; any value lower than this might cause lag.
    • FertilizerItem: Item used to fertilize a tree. Defaults to bone meal.
    • MaxUncollectedItems: Optional, approximate maximum number of items that can sit uncollected under a tree
    • MaxTreesPerPlayer: Optional cap on number of trees a player can plant.
    • MaxIsPerWorld: Optional, if MaxTreesPerPlayer is defined, this allows the max to be either per world or server-wide.
    • WandItem: Right click a tree with this item in hand to see its type and fertilizer status.
    • MinimumTreeDistance: Optional, minimum distance between trees.
    • TreeTypes: This section defines the allowed types of trees that can be planted. The following values must be set for each tree type:
      • DropLikelihood: The chance of a drop happening each interval. Can be set from 0-100, where 100 is always drop and 1 is one chance in a hundred intervals. Fractional values now permitted.
      • RequireFertilizer: If set to Yes, the trees of this type will stop dropping items and require bonemeal to continue (if you set this to yes, either DropsBeforeFertilizer or IntervalsBeforeFertilizer must also be set).
      • DropsBeforeFertilizer: Sets the approximate number of drops before the tree gets tired and requires fertilizer (this option cannot be combined with IntervalsBeforeFertilizer).
      • IntervalsBeforeFertilizer: Sets the approximate number of time intervals before the tree gets tired and requires fertilizer (this option cannot be combined with DropsBeforeFertilizer).
      • TreeType: Defines the type of tree that will grow from the sapling. Can be "Standard", "Spruce", or "Birch".
      • MaxFertilizer: Optional, approximate number of times a tree can be fertilized. After the maximum is reached, the tree dies (trunk disappears and the leaves decay).
    Permissions: If you don't have a permissions plugin, then only Ops will be able to plant trees.
    • appleseed.plant.*: This will allow the planting of any item in the AllowedTreeTypes list.
    • appleseed.plant.apple: This only allows the planting of an "apple".
    • appleseed.infinite.plant: Trees planted by a player with this permission will never stop dropping items.
    • appleseed.infinite.fertilizer: Trees fertilized by a player with this permission will never need fertilizer again.
    • appleseed.infinite.cap: This allows a player to plant more than the defined MaxTreesPerPlayer.
    • appleseed.wand: Players can right-click a tree with a wand item(defaults to wooden hoe) to get type of tree and fertilizer status.
    • appleseed.sign.place: Player has permission to place an [Appleseed] sign on a tree.
    Screenshots:

    2011-05-19_15.50.19.png An apple tree with some apples under it.

    2011-05-30_13.22.39.png Two trees with signs. On the left is an "infinite" apple tree, and on the right is a tree that needs fertilizer.

    Video: This video demonstrates how to plant an apple and a cookie. Note that the drop rate has been increased for demonstration purposes.

    Old Changelog (open)
    Version 0.6.4 (08/25/2011)
    • Refactored trees per player counting
    Version 0.6.3 (08/09/2011)
    • Replaced calls to deprecated Bukkit methods
    • Added AllowNonOpAccess parameter to config file for servers without permissions
    • If a player exceeds the maximum allowed trees, the error message will now display the number they have planted and the maximum allowed.
    Version 0.6.2 (07/10/2011)
    • Fix error handling when ShowErrorsInClient is disabled
    Version 0.6.1 (07/01/2011)
    • Fix for "n must be positive" exception
    Version 0.6.0 (06/13/2011)
    • Added optional MaxUncollectedItems config parameter that can prevent items from piling up under trees
    Version 0.5.6 (06/12/2011)
    • Players are prevented from "eating" a seed item if a tree can't be planted for some reason (requested by Joy)
    Version 0.5.5 (06/05/2011)
    • Non-integer DropLikelihood values allowed
    • Configurable per player cap on how many trees can be planted (per world or server-wide)
    • Fertilizer item can be customized
    Version 0.5.0 (05/30/2011)
    • Added support for signs on trees (suggested by kaasinees)
    • Better support for items with damage values
    • Corrected spelling of "fertilizer" in config file (misspelling still works)
    • Added IntervalsBeforeFertilizer parameter to tree type config (suggested by Zarius)
    Version 0.4.1 (05/29/2011)
    • Small tweak to handling of "wrong location" exception.
    Version 0.4.0 (05/26/2011)
    • Fixed a major bug in multiworld saving/loading. If you load this version without restarting the server, ie. with the "reload" command, then you might not lose data. Otherwise the trees outside of your main world will probably be lost. :'(
    • Added config option to enforce minimum distance between trees
    • Added config option to kill trees after some number of fertilizer cycles
    • Added wand item support to show tree type and fertilizer status
    • Allow clicking with wand or fertilizer anywhere on tree trunk
    • Fixed bug with ShowErrorsInClient config flag
    Version 0.3.2 (05/24/2011)
    • Added detection of WorldGuard regions when trees are planted
    Version 0.3.1 (05/23/2011)
    • Fixed bug with permission node "appleseed.plant.cocoa_beans"
    Version 0.3 (05/22/2011)
    • Restructured config file to allow per tree type drop rates and sapling types
    • Trees occasionally stop dropping items and require fertilizer to keep going
    • Added two permission nodes for admins to plant trees that don't require fertilizer, and allow admins to use fertilizer to cause an existing tree to no longer require fertilizer
    • Saving the trees.yml file now runs in a separate thread to improve performance when a large number of trees exist
    • Fixed bug where last tree is not removed from trees.yml (reported by GipsyKing)
    Version 0.2 (05/19/2011)
    • Fixed potential bug that caused some drops to have infinite quantity (reported by walruscode)
    Version 0.1 (05/19/2011)
    • Initial release
    Feature(s) expected for later releases:
    • Config flag to disable initial sapling growth with bonemeal
    • Adjust DropInterval so it uses real time rather than tickrate (for servers with customized tickrate)
    • Bonus items with very low likelihood / configurable "seed" items
    • Suggestions?
     

    Attached Files:

  2. Offline

    redsgreens

    @Joy: Version 0.3.2 is out now with support for WorldGuard.
     
  3. Offline

    Pneumatus

    Is there any possibility that a configurable wand item could be used to check trees to see what type they are and if they need fertilizing (assuming RequireFertilzer is set)?
     
  4. Offline

    Icemelt

    This plugin now exists on our private server! <3
     
  5. Offline

    redsgreens

    Great idea. This is going into the next version.
     
  6. Offline

    den

    If you make the tree drop items that have a damage value, the value does not survive a server restart.
     
  7. Offline

    redsgreens

    Can you give me an example from the Trees section of your config.yml where you define a tree type with a damage value?
     
  8. Offline

    kaasinees

    or make a sign on the tree with its status.

    i dont like wands.
     
  9. Offline

    redsgreens

    I'm not a huge wand fan either, except that they are really easy to implement. :)

    I like the sign idea quite a bit, though. I think I would have to set it up so the player would have to place the sign after the tree is grown, since I don't know when the tree grows, or where best to place the sign.
     
  10. Offline

    kaasinees

    How about putting a sign with [Appleseed] on the tree will activate the status sign?
    It should be easy to add in the database to.. under the tree record the location of the sign.
     
  11. Offline

    redsgreens

    That's exactly what I was thinking. I'll definitely add this, but I don't think it'll make it into the next release.
     
  12. Ran into this:

    Code:
    02:16:49 [INFO] Wrong location! net.minecraft.server.EntityItem@b38972
    02:16:49 [INFO] -1520.5,-244.5(-96,-16) vs -95,-16
    02:16:49 [SEVERE] java.lang.Exception: Stack trace
    02:16:49 [SEVERE]       at java.lang.Thread.dumpStack(Thread.java:1342)
    02:16:49 [SEVERE]       at net.minecraft.server.Chunk.a(Chunk.java:367)
    02:16:49 [SEVERE]       at net.minecraft.server.ChunkLoader.a(SourceFile:181)
    02:16:49 [SEVERE]       at net.minecraft.server.ChunkRegionLoader.a(SourceFile:42)
    02:16:49 [SEVERE]       at net.minecraft.server.ChunkProviderServer.loadChunk(ChunkProviderServer.java:132)
    02:16:49 [SEVERE]       at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:62)
    02:16:49 [SEVERE]       at org.bukkit.craftbukkit.CraftWorld.getChunkAt(CraftWorld.java:92)
    02:16:49 [SEVERE]       at org.bukkit.craftbukkit.CraftWorld.getBlockAt(CraftWorld.java:60)
    02:16:49 [SEVERE]       at org.bukkit.craftbukkit.CraftWorld.getBlockAt(CraftWorld.java:448)
    02:16:49 [SEVERE]       at redsgreens.Appleseed.AppleseedTreeManager.ProcessTrees(AppleseedTreeManager.java:50)
    02:16:49 [SEVERE]       at redsgreens.Appleseed.AppleseedTreeManager$1.run(AppleseedTreeManager.java:104)
    02:16:49 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:138)
    02:16:49 [SEVERE]       at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:365)
    02:16:49 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:292)
    02:16:49 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
     
  13. Offline

    redsgreens

    That's a weird one. I have some ideas on how to address it, but it would help to know the following:
    1. Did this show up just once, is it spamming the log, or appearing periodically?
    2. I'm assuming you are running Appleseed v0.3.2?
    3. Any clue at all what might've happened at the time the exception happened?
     
  14. 1. Rarely, 1-2 times total over a day.
    2. Latest.
    3. No, but people love this feature, so it's being used a lot, difficult to say.
     
  15. Offline

    redsgreens

    Version 0.4.0 is out now. It fixes a major bug in saving/loading trees in worlds other than the main world. There is a chance that the data for trees outside the main world might be lost. The bug happens when the plugin loads, so back up your trees.xml file while the server is running, then upgrade Appleseed using the "reload" command. I'm very sorry if anyone loses their data due to this.

    Also, I added a potential fix for the "wrong location" bug. I say "potential" because I haven't been able to reproduce this issue myself.

    Besides these bug fixes, a few new features are also included:
    • Added config option to enforce minimum distance between trees
    • Added config option to kill trees after some number of fertilizer cycles
    • Added wand item support to show tree type and fertilizer status
    • Allow clicking with wand or fertilizer anywhere on tree trunk
     
  16. Awesome, testing :)
     
  17. Offline

    Pneumatus

    Another small request, when you fertilize an Appleseed tree could a message be printed to say the tree has been fertilized :)
     
  18. Offline

    Zarius

    Looks great. Perhaps instead of a wand you can report the tree and type just on hitting it? That way anyone going to chop it down will be notified.

    Also, is it possible to have the tree die after a set number of cycles, rather than fertilizer cycles? Or perhaps have fertilizer cycles set to a number of cycles rather than a number of drops.

    I want to set up golden apple trees for those that are lucky to find them but don't want the tree to be a guaranteed duplicator. As it is now if I set the drop % to 1%, dropsbeforefert to 5 and maxfert to 2 then it just means they have to wait a while but will always get 10 golden apples for the price of one. If it was cyclesbeforefert:5 then there's a chance they'll get between zero and 10 golden apples (albeit very very low chance for 10 :D).
     
  19. Offline

    redsgreens

    @Zarius: it makes sense what you are saying about cycles vs drops. I was going to release version 0.5 very soon (with support for signs on trees that indicate type and fertilizer status), but I think I'll delay it to add something that addresses your concern. A CyclesBeforeFertilizer parameter that could be used as an alternative to DropsBeforeFertilizer would do the trick, I think.

    @Joy: I'll take another look at this issue.

    @Pneumatus: Right now you can tell if the tree is successfully fertilized by looking at your bonemeal count before and after you right click. It should decrease by one. When v0.5 is out it will be very obvious, provided you put signs on your trees.

    Version 0.4.1 is out to hopefully address this.

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

    Lolmewn

    cool plugin :p
     
  21. Still getting these: http://pastie.org/1992502

    But I see them regularly, also without Appleseed mention, perhaps a bug in Bukkit or multi world? I dunno :/
     
  22. Offline

    redsgreens

    I think it must be an issue with Bukkit. There two things weird about this:
    1. The exception is thrown by Bukkit itself, after Appleseed calls the Chunk.getBlockAt() method.
    2. Despite my attempts, Appleseed never sees the exception and doesn't throw an exception itself.

    Version 0.5.0 is out now, with the following changes:
    • Added support for signs on trees (suggested by kaasinees)
    • Better support for items with damage values
    • Corrected spelling of "fertilizer" in config file (misspelling still works)
    • Added IntervalsBeforeFertilizer parameter to tree type config (suggested by Zarius)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  23. Great update again, thanks!
     
  24. Offline

    redsgreens

    I'm glad people are enjoying this plugin, it has been fun coding it as well.

    One thing I forgot to mention about the latest update is that existing planted trees do not switch from "drop" mode to "interval" mode automatically. Let me know if you want assistance modifying your trees yaml file to accomplish this.
     
  25. Offline

    Jack14112

    I love this plugin, I just installed it on my server. It was super easy to configure and everyone loves it.
    Thanks Redsgreens. :) Oh and it's working fine on 818
     
  26. Offline

    fatmarley

    I would really like a simple way to limit the amount of trees each person can plant. I use fertilizer and changed the drop rate to 5 for each tree. Hopefully this will help. The last thing i want is for this to become a huge mod.

    thanks for this!!!
     
  27. Offline

    moonjokes

    ^^^^
    This plugin is great but this would make it even better :)
     
  28. Offline

    redsgreens

    I'm away from my PC for a few days, but I'll try to get this implemented as soon as possible. The groundwork is mostly done, so it should be an easy addition.
     
    fatmarley likes this.
  29. Offline

    papersneaker

    I really like the potential of your plugin.

    I got this error this morning when I booted up. I haven't had time to investigate but I will do some more later. I just want to post it here in case you may have seen it before.

    Code:
    08:52:40 [SEVERE] java.io.FileNotFoundException: plugins\Appleseed\trees-(custom multi world).yml (The process cannot access the file because it is being used by another process)
    08:52:40 [SEVERE]       at java.io.FileOutputStream.open(Native Method)
    08:52:40 [SEVERE]       at java.io.FileOutputStream.<init>(Unknown Source)
    08:52:40 [SEVERE]       at java.io.FileOutputStream.<init>(Unknown Source)
    08:52:40 [SEVERE]       at redsgreens.Appleseed.AppleseedTreeManager.saveTrees(AppleseedTreeManager.java:379)
    08:52:40 [SEVERE]       at redsgreens.Appleseed.AppleseedTreeManager$2.run(AppleseedTreeManager.java:401)
    08:52:40 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    08:52:40 [SEVERE]       at java.lang.Thread.run(Unknown Source)
    
    >
    I just created the new custom world using multiverse 1.7 yesterday. trees-(custom world).yml does exist. Have you since this issue before? It may be a conflict with one of plugins. If you haven't seen this error before let me know and I will share my plugin list.

    It doesn't seem to break the sever or existing trees on the main world.
     
  30. Offline

    Techykid3

    Will this stop dropping apples after a certain amount is under that tree?
     

Share This Page