Reforestation
If you're anything like me, when you're playing Minecraft wood is in a constant demand. So, you go and cut down some trees from a forest, right? That means a few less trees for the forest. The trees do drop saplings, but do you really take the time to replant them every single time? How about other people on your server? If you're not careful, serious deforestation can occur, leaving countless animals without a home. Remember, biodiversity shrinks with habitat loss! This problem may seem too large to tackle all by yourself, and you'd be right to think so. That's where Reforestaion comes in! A revolutionary simple plugin that lets mother nature take care of herself!
How is this possible?
Every time a sapling drops from a player or tree, if it can be planted where it lays, it will automatically be placed as a sapling block and will eventually grow into a new tree. No work required on your part!
Is it customizable?
If you're updating to v2.2.0, you have to change your itemID and blockID nodes to itemName and blockName nodes that use Bukkit materialsYes! If you edit the config file located in /plugins/Reforestaion/reforestation.xml, you can set any block and metadata combination. By default the vanilla saplings will only be added, but you can remove or add any blocks you want. This includes things like flowers and mushrooms, but also is extendable to modded saplings (when Bukkit implements a way to access those modded items though IDs or names). You can also set the delay for how often the plugin checks for saplings, which is by default every 200 ticks, or 10 seconds. The tick delay value is measured in ticks, so that means 20 ticks equals 1 second.
In this XML file you can also specify entire worlds that should be disabled as well as specific WorldGuard regions. If you would like to disable Residence regions, make sure the flag "autoplant" (which is enabled by default) is disabled in the region.
Because some users may find it difficult to change values in the config, I'll post what the reforestation.xml file will look like when it's first generated. You can open it with any text editor such as Notepad.
<?xml version="1.0" encoding="UTF-8"?>
<reforestation>
<!-- You can toggle whether the plugin is enabled or not using the command "/reforestation [on|off]" in game, but this controls if it's enabled on startup -->
<autoEnable>true</autoEnable>
<!-- This is how long the plugin waits to see if it can plant saplings. 1 second = 20 ticks -->
<tickDelay>200</tickDelay>
<!-- The following shows how to disable certain worlds
<disabled type="world">
<world>name_of_world_to_disable</world>
</disabled>
-->
<!-- This shows how to disable certain WorldGuard regions
<disabled type="region">
<world>world_that_region_is_in</world>
<region>name_of_region_to_disable</region>
</disabled>
-->
<!-- If you want to disable Residence regions, then make sure the flag "autoplant" is disabled in the region -->
<plant name="Oak">
<itemName>SAPLING</itemName>
</plant>
<plant name="Spruce">
<itemName>SAPLING</itemName>
<itemMeta>1</itemMeta>
</plant>
<plant name="Birch">
<itemName>SAPLING</itemName>
<itemMeta>2</itemMeta>
</plant>
<plant name="Jungle">
<itemName>SAPLING</itemName>
<itemMeta>3</itemMeta>
</plant>
<plant name="Acacia">
<itemName>SAPLING</itemName>
<itemMeta>4</itemMeta>
</plant>
<plant name="Dark Oak">
<itemName>SAPLING</itemName>
<itemMeta>5</itemMeta>
</plant>
<!-- Below is an example of how you would add items that plant different blocks
You can specifiy the blockName and blockMeta nodes to customize which block is placed
By default the block and metadata used are the same as the item's
<plant name="Wheat Seeds">
<itemName>SEEDS</itemName>
<blockName>CROPS</blockName>
</plant>
-->
</reforestation>
Tip: A comment is anything between
<!-- and -->Comments are completely ignored and are only there to help you.
To add more saplings, just create a new plant node, fill out the name attribute, and then add more sub-nodes. The sub-nodes you can add are: itemName, the material of the dropped item; itemMeta, the metadata of the dropped item; blockName, the material of the block that will be placed; and blockMeta, the metadata of the block that will be placed. You do not need to include itemMeta if the metadata is 0 or blockMaterial and blockMeta if those are the same as the original items.
To add a WorldGuard region where auto planting is disabled, simply uncomment out the disabled region node and change the world and region names to your own. You can add as many disabled regions as you'd like. Disabled worlds work the same way, except you don't need the plugin WorldGuard to use them, their type attribute is "world", and they don't use the region sub-node. In order to disable Reforestation in a Residence region, simply make sure the flag "autoplant" is disabled there.
If you're having trouble understanding how to change the config, please post a comment and I'll try to help you.
You can also use /reforestation [on|off] to enable or disable the plugin at any time in game. You need to have the permission node reforestation.toggle in order to use the command. If you want the plugin to be disabled when you start the server, change auto enable to false in the config.yml, or else every time you start the server the plugin will enable planting.
Why do I need this?
It's a fun plugin that adds a nice rounded feel to your server. An example of its realism is that you could start a fire that will actually help the forest grow by causing saplings to fall, just like in the real world.
How did you make such an amazing plugin?
I'm glad you asked! If you're interested in seeing how I accomplished anything, please check out the plugin's source at https://github.com/Jsnman/Reforestation
I really love this plugin, but I think it crashes my server, this is the error I got:
Other plugins I'm using are Orebfuscator, NoCheatPlus, Essentials and ChestShop. I'm using the latest CB build (1.5.1-R0.2)
@Twilight314
Seeds aren't supported right now because their item ID and block ID are different. That may also be the case with the ExtraBionesXL saplings, but I'm not sure.
EDIT: It looks like as of the current version the sapling item ID has to be less than 256. I did write this before Minecraft allowed blocks to be up to 4096, so I'm changing it right now.
@GioboiMC
Residence support along with WorldGuard can be expected in a few days. I've had to redesign the config system in order to do this, so be prepared to have to change a few things.
@Zutiiq
Trees should be dropping saplings normally. It might be another plugin that's altering how they drop. I'll have a look at why the flowers aren't being planted as well.
Hmm...so far I haven't seen any saplings drop from trees, though when I drop a sapling it plants itself as it's supposed to, just no tree saplings from TREES are dropping. Do I need to enable something for trees to drop saplings themselves?
Edit: Also I enabled it so roses and dandelions would grow on their own, but they don't seem to be plating themselves when I toss them on the grass.
Looking forward to the residence support.
Using this with some mod plantable saplings/plants, and it's not working with some of them.
It works with some, such as the Indigo Flower and Rubber Tree Sapling from Redpower, but none of the saplings from ExtraBiomesXL are auto-planting. They used to when I used this plugin with Minecraft v1.2.5, so I'm not sure what's wrong or has changed since then. Maybe there's a syntax error here, but I'm not seeing it. Here's the config:
Oh, and can this plugin be used to plant seeds by throwing them, or is that not supported? Thanks!
Would this be compatible with residence? I don't want people going in spawn and just dropping saplings lol.
@fishyf1sh
This plugin doesn't change how trees grow, so it might be a different one. Try growing a tree without Reforestation and tell me if that still happens.
Love the plugin.
Oftentimes when a tree grows from sappling with this plugin, the bottom block is empty, leaving a floating tree.
Like this:
http://imgur.com/M97Q2UI
Does this happen for anyone else?
@meiamone
I just worked out a way to make Reforestation version independent, and I'm uploading it now. Version 1.7.0 should fix all Bukkit version incompatibilities from about MC 1.3 onward.
It seems 1.5.1 broke your plugin:
@Fluffgar
I'm just going to chime in here and say that (last I checked) there was a project that replaced the SP internal Minecraft server with a Bukkit one. If that's still around, you could add this plugin and then use that.
@Fluffgar
Right now there are no plans to have a client side version. With Forge as it currently is, I believe I would have to edit base classes, which I would prefer to stay away from. If I can find another way, I might go ahead and create a client mod.
Once the official modding API is released (which is more of a plugin API if you ask me), I'll make a client version for it, as this would be a perfect example of what the modding API was made for.
Are there any plans for other versions of this mod? Such as client only (AKA single player). I used to use Nature Overhaul over on the Minecraft Forums but that has died and all attempts to revive it seem to have stalled.
I know for single player I can just run a Bukkit server and connect to LocalHost in the client but I always liked to use Nature Overhaul in addition to other mods. So I wonder if there are any plans to expand upon it.
@LEOcab
I just uploaded v1.6.4 which works with 1.5.0-R0.1. No other changes have been made other than 1.5 compatibility. As always, tell me if there are any problems.
We can haz 1.5 compat?
Version 1.6.3 addresses an issue with faulty data being sent in the sapling drop event due to modded blocks. The console should no longer flooded with messages when an event doesn't fire properly.
Great plugin! This is just what I was looking for! :)
Version 1.6.2 has just been uploaded, which should fix the looping bug.
Nice plugin. Any bug fix or dev build.?
@CJHacker
Sorry about that, it looks like I accidentally shifted a value. It will be fixed soon.