[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

    turtlemoviesco

    When i try to plant the apple all that happens is i eat it.....

    Someone this works now, for no appeerant reason
     
  3. Offline

    gamemaster1494

    You should be able to have cake trees... That drop cake blocks. That way there is a way to get the cake_block in server, that also allows stacking of the cake blocks ^^

    You have to have them be OP if you dont have any permissions. Or in the config there is AllowNonOpAccess: No. Make it Yes. ^^

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  4. Thanks for the update!

    Request: Would be great if there was some way to clean old Trees. For example, if you would log/store the date/time of latest Fertilizing. Then a config flag in days. After X days of non-fertilizing, remove the Tree from the config, and thus the player's Tree allocation.
     
  5. We've been seeing this for a long time, but since last version, can finally clearly show the issue.

    http://i.imgur.com/yf7LG.png

    Appleseed]$ grep -H Xslare *.yml | wc -l
    112

    112 entries in the YML files for Xslare, yet it thinks he has reached the limit of 200, and for himself he knows he has 72 planted? Something really is going wrong in the Tree administration.
     
  6. Offline

    Snock

    it works, thanks!
     
  7. Offline

    redsgreens

    I just refactored the tree counting code and uploaded it as version 0.6.4.
     
  8. Offline

    TTlabambaTT

    is it possible to get the icon ,for example an apple, floating inside the leaves of an apple tree but not being able to pick them up just to add to the visual effect of apple trees and etc. I have absolutly no knowledge of plugin creating so i dont even know if its possible just somthing that would look really nice if you could pull it off
     
  9. Offline

    dillon1005

    Do you Think you can add % to the plugin. like what % dose a apple drop or gold apple or cookie the % out of 100% and when it will drop
     
  10. Offline

    ice_cube

    what i would like to see is a coca tree :)
    like the apple tree and make the leves diffrent like a coca tree that would be awsome
     
  11. Offline

    Vettexl

    Is there a Build 1000 compatible version or will this work? (We haven't updated as we're waiting for WorldGuard/WorldEdit to update to 1060).

    Thanks, and looks like a great plugin!
     
  12. Offline

    leonebozz

    Very nice!
    thank you :D
     
  13. DropLikelihood is the percentage.

    This works fine with 1060.

    You can add any item, so you can make your own cocoa tree.

    Thanks, works nicely so far :)

    Got another new feature request. Thing is, currently it is really easy to automate farming these, just by adding water under trees. I think it would be cool if there's a mode where drops get "stored" in the tree, like apples growing on a tree. Then when you hit the tree with a configured item/tool, the collected drops fall from the tree.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  14. Will this work fine with 1.8, as in, new items? Always wondered where AppleSeed gets its item list from, does it need updated for them?
     
  15. Offline

    jogajoga

    I think it's one of the most funny plugins ;)
     
  16. Offline

    RamTam

    I'm using Appleseed 0.6.4 (CB1060)
    The Appleplant and drop works fine but the fertilize system does not work correctly ._.
    The main setting for RequireFertilizer is "Yes" but if I place a sign on the tree I get a blue colored "[Appleseed]"
    and on line below a turquoise "cacao_beans" so this is meaning the tree has infinite fertilize?
    If I hit the tree with a wooden_hoe, I get the message "Appleseed: type=cocoa_beans, NeedsFertilizer=false"
    So what am I doing wrong?

    Here the conig. entry:
    cocoa_beans:
    DropLikelihood: 15
    RequireFertilizer: true
    DropsBeforeFertilizer: 15
    MaxFertilizer: 10
    TreeType: Spruce
     
  17. Offline

    redsgreens

    The plugin gets its list from the built in Bukkit "matchMaterial" method, which parses item names, plus a little bit of code I wrote to support wool/dye colors and wood/sapling types. I just updated the "items.txt" file attached to the first post that has all of the currently recognized items/blocks.
     
  18. Offline

    dillon1005

    yah u should have a DropLikelihood is the percentage.
     
  19. Offline

    RamTam

    Do you have a answer for my question? Would be nice because fertilize would make your plugin perfect -__-
     
  20. Offline

    redsgreens

    My guess is that this is due to your permissions configuration. If you have "appleseed.*" permissions set, then that means you have "appleseed.infinite.fertilizer" permission, which always sets every planted tree to NeedsFertilizer=false.
     
  21. Offline

    Xanadar

    I am having the same issue with my trees having infinite everything despite what I have in the config file, and the only permissions I have given to anyone is

    - appleseed.plant.apple
    - appleseed.wand
    - appleseed.sign.place
     
  22. Also possibly related:

    Code:
    08:59:14 [SEVERE] Could not pass event SIGN_CHANGE to Appleseed
    java.lang.NullPointerException
            at redsgreens.Appleseed.AppleseedTreeData.isInfinite(AppleseedTreeData.java:257)
            at redsgreens.Appleseed.AppleseedTreeData.needsFertilizer(AppleseedTreeData.java:309)
            at redsgreens.Appleseed.AppleseedTreeManager.updateSign(AppleseedTreeManager.java:540)
            at redsgreens.Appleseed.AppleseedBlockListener.onSignChange(AppleseedBlockListener.java:76)
            at org.bukkit.plugin.java.JavaPluginLoader$34.execute(JavaPluginLoader.java:476)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:1035)
            at net.minecraft.server.Packet130UpdateSign.a(SourceFile:41)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:91)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    
     
  23. Offline

    teenspirit7

    Hey, great plugin, but is there a way to get it so that A red apple tree occasionally (rarely) drops golden apples?

    Thanks
     
  24. Offline

    RamTam

    Yes this was the problem.. I'm admin and have the permission - "*" so I have to great a new group and have to log in with Mc SP to greate a fertilize needed tree?


    I use the same permission for my user. Some notes you have to notice:
    #1 Permission updated?
    #2 does Permission work?
    One tip if youre not using it: Install "I chat" which allows you to color your groups.
    Based on this Plugin I can see if Permission works correctly or not.
    (You know, one mistake can crash the whole plugin ingame?)
    Also try to correct your code here:
    http://yaml-online-parser.appspot.com/
    Just copy and paste and if it send you an error you know there's a mistake in it ;)
     
  25. Offline

    Xanadar

    Yeah, it's correct. I guess I just need to manually change the settings myself. lol
     
  26. Offline

    GayJuice

    any plans to update to 1185?

    i want my melon trees :)
     
  27. Offline

    redsgreens

    CB1185 is supported, no update required. Take a look at the "items.txt" file attached to the first post. It lists all the items recognized using a built in Bukkit function. When Bukkit is updated to support new items, the plugin will automatically recognize them(generally speaking). For melons, use "melon_block".
     
  28. Offline

    Kinkajou

    Any ability to specify items by item ID, or allow the user to set up a custom csv file to specify custom names for items (like the Essentials items.csv)?
     
  29. Offline

    redsgreens

    You can already use item IDs, but support for custom names is not there (not planned either, sorry).
     
  30. Offline

    Kinkajou

    It's fine, as long as item ID is in there it's all gravy. I haven't looked in the config in a while and haven't yet gotten to re-adding it to my server.
     
  31. Offline

    Kinkajou

    A suggestion I just came up with a little while ago. Have an Infinite Fertilizer field (you could set it for something like Ink Sac) and then if you have infinite fertilizer permission you can use standard fertilizer (bone meal) or you can use infinite fertilizer (Ink Sac). That way if you just want to start a tree as Admin but don't want it to be infinitly fertile, you could.
     

Share This Page