[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

    @papersneaker: I haven't seen the error before, but I don't see how it's a conflict. When/how often does it occur?

    @Techykd3: unfortunately no, there's no way for a plugin to tell how many items are sitting in a particular area.
     
  3. Offline

    Adonijah

    Is there a way to change the fertilizer type? Because we play with mcmmo we'd like to use cocoa beans as fertilizer. Can you make this possible?
     
  4. Offline

    Wakko

    How would you make it so the tree only drops apples if the leaves are broken/decay?
     
  5. Offline

    NeonJ

    This looks awesome, but I would love a way to set the drop likelyhood.. lower. Like. 0.1 in 100. Because I want to have an EXTREMELY rare Diamond Tree in the middle of my town which people can take the drops off... but I only want it to drop like once a day, to make it extremely lucky for the person who saw the drop.
     
  6. Offline

    redsgreens

    @Adonijah: I'll make this a configurable setting in the next release.

    @Wakko: there are other plugins out there that drop items when leaves decay. I'm not planning on adding that behavior to this one.

    @NeonJ: I think I can work this feature into the next release as well.
     
  7. Offline

    papersneaker

    @papersneaker: I haven't seen the error before, but I don't see how it's a conflict. When/how often does it occur?

    @redsgreens latest example I rebooted our server at 02:30 AM EST. We then played again untill 4:50 AM.

    I left the server running because that is the best way to see what happens over long periods. I recieved the same error that I mentioned before at 9:30 AM EST.

    The error doesn't happen often maybe once a reboot. Is it possible that the plugin is trying to access the same file again while it is reading the file already. It is so strange because there are our only appleseed trees on our first world. We haven't place any appleseed tree on our multi-world yet.[/quote]
     
  8. Offline

    redsgreens

    Version 0.5.5 is out now with these changes:
    • 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
     
  9. Offline

    woodzy

    @ redsgreens
    SEE MOM DIAMONDS DO COME FROM TREES!!!!
    MINECRAFT FTW!!
    good work man
     
  10. Offline

    Adonijah

    Love it. But I had to reinstall and the config is empty :confused:.. Anyway someone could post it?
     
  11. Offline

    redsgreens

    The config.yml file exists but is empty? Not sure how it got that way, but you should try deleting it and then "reload" your sever. That should recreate the default config file.
     
  12. Offline

    GayJuice

    this is truly amazing i made a whole other class in my server "Advanced Farmer" just for this plugin, many many thanks and keep up the good work
     
  13. Offline

    Klausar

    I did everything as in the video but my tree doesnt drop any apples (I have RB 860)
     
  14. Offline

    redsgreens

    Stick a sign on the tree and set the first line to "[Appleseed]" without the quotes. Attach a screenshot of the tree with the sign, the config.yml file, and the trees-world.yml (DO NOT paste the contents of these files into a message). With all that info I can probably figure out what went wrong.
     
  15. Thanks for the update!

    Could you make it so it does not actually use/spend the seed item when you try to plant a Tree within minimum range of another Tree?
     
  16. Offline

    Klausar

    Seems like the "MaxTreesperPlayer" doesnt work :(
     
  17. Offline

    redsgreens

    It works fine for me on my test server. Attach your Appleseed/config.yml file and I'll take a look. (Please DO NOT paste it into the body of message)

    Version 0.5.6 is out now that does exactly that. Thanks for the suggestion!

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

    Klausar

    This is my config. They should plant only 2 Trees but they are able to plant 5 and more.

    Edit: oh fail sorry i forgot to remove the #

    But I have another problem. I have every morning 500 Apples under each tree. Is it possible to fix that?
     
  19. Offline

    BlazeStorm

    Awesome plugin mate \o

    But, i've tryied to configure to drop cooked porkchops, but it doesnt works :X

    My config is like that:


    Why when i try to plant it just eats the item?
     
  20. Offline

    Klausar

    Seems like they still can plant as much as they want. Here is my config:
    Code:
    #
    # ShowErrorsInClient: toggle that determines if permissions or other error messages
    #                     are displayed client-side
    #
    # Allowed values : Yes (shows errors to players)
    #                  No  (errors only show up in server console)
    #
    ShowErrorsInClient: Yes
    
    #
    # DropInterval: length of time, in seconds, between drops
    #
    # Allowed values: numbers bigger than 1 (no decimals)
    #
    DropInterval: 45
    
    #
    # FertilizerItem: item used in game to fertilize a tree
    #
    # Allowed values: any item id or item name (default is bone_meal)
    #
    FertilizerItem: bone_meal
    
    #
    # MaxTreesPerPlayer: optional parameter, maximum number of trees a player can plant
    #
    # Allowed values: any integer bigger than 1 (set to -1 to disable, or comment out the parameter)
    #
    MaxTreesPerPlayer: 2
    
    #
    # MaxIsPerWorld: optional parameter, determines if MaxTreesPerPlayer setting is server wide or per world
    #                defaults to "No"
    #
    # Allowed values : Yes (players can plant MaxTreesPerPlayer trees in each world)
    #                  No  (players can plant MaxTreesPerPlayer regardless of which world they are planted in)
    #
    #MaxIsPerWorld: Yes
    
    #
    # WandItem: item used in game to see what type a tree is and if it needs fertilizer
    #
    # Allowed values: any item id or item name (default is wood_hoe)
    #
    WandItem: wood_hoe
    
    #
    # MinimumTreeDistance: optional parameter specifies minimum block distance between planted trees
    #
    # Allowed values: any number bigger than 1 (set to -1 to disable, or comment out the parameter)
    #
    #MinimumTreeDistance: 8
    
    #
    #
    # TreeTypes: list of items that can be planted in soil(aka farmland)
    #
    # Example:
    #    - "apple"                      # Name of the item that must be planted and will be dropped
    #        DropLikelihood: 33         # Chance an item will drop under a tree (numbers 1-100)
    #        RequireFertilizer: Yes      # Yes if the tree should require occasional fertilizer
    #        DropsBeforeFertilizer: 50   # Approximate number of drops before fertilizer is required
    #        MaxFertilizer: 5            # Approximate number of times a tree can be fertilized (optional, or set to -1 to disable)
    #        TreeType: Standard         # Type of tree that should grow from the sapling (Standard/Spruce/Birch)
    #
    TreeTypes:
        apple:
            DropLikelihood: 60
            RequireFertilizer: Yes
            DropsBeforeFertilizer: 50
    #        MaxFertilizer: 10
            TreeType: Standard
    
        cocoa_beans:
            DropLikelihood: 33
            RequireFertilizer: Yes
            DropsBeforeFertilizer: 50
    #        MaxFertilizer: 10
            TreeType: Spruce
    
        cookie:
            DropLikelihood: 50
            RequireFertilizer: Yes
            DropsBeforeFertilizer: 50
    #        MaxFertilizer: 5
            TreeType: Standard
    
     
  21. Offline

    redsgreens

    When Appleseed loads, it prints something like the following on the server console:
    Code:
    08:01:49 [INFO] Appleseed: ShowErrorsInClient=true
    08:01:49 [INFO] Appleseed: DropInterval=60 seconds
    08:01:49 [INFO] Appleseed: MaxTreesPerPlayer=5
    08:01:49 [INFO] Appleseed: MaxIsPerWorld=true
    08:01:49 [INFO] Appleseed: WandItem=wood_sword
    08:01:49 [INFO] Appleseed: FertilizerItem=cocoa_beans
    08:01:49 [INFO] Appleseed: MinimumTreeDistance=disabled
    08:01:49 [INFO] Appleseed: TreeTypes=(diamond,golden_apple,apple,lime_dye,cookie,cocoa_beans)
    08:01:49 [INFO] Appleseed: Permissions 2.5.5 found
    08:01:49 [INFO] Appleseed: 5 trees loaded in world world.
    08:01:49 [INFO] Appleseed: 0 trees loaded in world world_nether.
    08:01:49 [INFO] Appleseed version 0.5.6 is enabled!
    
    If you look at the line that says "TreeTypes=(...)", you will see all the tree types that the plugin has recognized. If you don't see something you have added to the config file, then there must be some problem with it in the config. In your case, the problem is that the right name for the cooked porkchop is "grilled_pork". For future reference, I just attached a file to the first post in the thread called "items.txt" that lists all the recognized item names.

    Your config looks fine, so the problem must be permissions related. Are you giving your players "appleseed.*" permission? If so, then they have "appleseed.infinite.cap" perms, which means they can exceed the defined max per player.

    The only thing you can do to impact this is to increase the interval time, or reduce the drop likelihood. Items naturally despawn after 5 minutes, so if they are spawning at too high a rate, then they will tend to accumulate. I'm afraid there's nothing I can do to detect how many items are uncollected on the ground .

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

    Klausar

    I gave them the appleseed.plant.* permission but not appleseed.*
     
  23. Offline

    redsgreens

    I ran the config file you posted on my test server and the cap worked fine. I'd like to see your permissions config, and also the text that Appleseed prints on the server console when it starts up. Because the formatting of the permissions config is very important, please don't paste it into a message. Use the attach function of the forum.

    I know I've been saying it's not possible since the beginning, but.. Version 0.6.0 is out now that can prevent items from piling up under trees. The optional "MaxUncollectedItems" parameter defines approximately how many items can sit uncollected under a tree.

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

    Malao567

    thanks, but cocoa beans and apples are so rare that i am not even sure if apples exist anymore... maybe a wheat tree? it would be convenient. great plugin otherwise. keep up the good work!
     
  25. Offline

    Mathew Alden

    Hi. Cool plug-in. So I can grow apple trees and cookie trees right? Now just make it to grow Cocao trees and you'll be 50% awesomer. That's 150%!

    No really... Cocao trees please.
     
  26. Offline

    redsgreens

    You can make a tree drop whatever you want by customizing the config file.
     
  27. Offline

    Mathew Alden

    Oh... wow. cool! Should've read more...
     
  28. Request, a command for users to check how many trees they have planted, for the cap thing :p
     
  29. Plugin suddenly started spamming these:

    Code:
    [SEVERE] Could not pass event PLAYER_INTERACT to Appleseed
    java.lang.IllegalArgumentException: n must be positive
            at java.util.Random.nextInt(Random.java:294)
            at redsgreens.Appleseed.AppleseedTreeData.ResetDropCount(AppleseedTreeData.java:218)
            at redsgreens.Appleseed.AppleseedPlayerListener.handleFertilzeEvent(AppleseedPlayerListener.java:167)
            at redsgreens.Appleseed.AppleseedPlayerListener.onPlayerInteract(AppleseedPlayerListener.java:46)
            at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:307)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
            at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:210)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:552)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  30. Offline

    redsgreens

    Weird, that really shouldn't happen. But I added some error checking for it, so version 0.6.1 shouldn't throw that exception.
     
  31. It happened when an admin (with all nodes) was planting pumpkin trees, if that helps.
     

Share This Page