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
-
View User Profile
-
Send Message
Posted Dec 24, 2012@zizitt
That's a good idea. I'll go ahead and add that in the next version.
-
View User Profile
-
Send Message
Posted Dec 24, 2012Does this come with a toggle command? If yes, awesome!
If not, this plugin could please many but annoy some. Having the command /reforest on/off or short /rf on would make this very useful.
Otherwise I really like the idea, planting saps is a paaaiiin.. :) keep at it!
-
View User Profile
-
Send Message
Posted Dec 23, 2012@Vapor_Lock
Regions, not yet. As of now it's just on a world per world basis. Cacti will work, but seeds and sugarcane will not because the seed and sugarcane items have different item IDs than their blocks, if I'm not mistake. I'll see about adding a way to work around that.
-
View User Profile
-
Send Message
Posted Dec 23, 2012Is there a way to disable this for protected regions? Also can it work with seeds, cacti, sugarcane etc?
-
View User Profile
-
Send Message
Posted Dec 23, 2012@Jsn_man
Awesome! Thank you! I feel bad for you plugin devs now that you have update on eeeeeeeevery tiny change. :(
-
View User Profile
-
Send Message
Posted Dec 22, 2012@LEOcab
Fantastic. I'll update again soon, probably today.
-
View User Profile
-
Send Message
Posted Dec 22, 2012@Jsn_man
Umm... 1.4.6 is out. You gotta update again. :P
-
View User Profile
-
Send Message
Posted Dec 21, 2012@LEOcab
It needed to be approved first. The update is live now.
-
View User Profile
-
Send Message
Posted Dec 21, 2012@Jsn_man Where's the update? :D
-
View User Profile
-
Send Message
Posted Dec 20, 2012Okay, I've just updated the plugin for 1.4.5. I've also added a feature that allows you to disable replanting for certain worlds, as requested. Better late than never.
-
View User Profile
-
Send Message
Posted Dec 20, 2012http://pastebin.com/2XzrbbeF
God, I hate updates. >.<
-
View User Profile
-
Send Message
Posted Dec 19, 2012@HPoltergeist Like I said in the post below yours, this doesn't work on the latest CraftBukkit RB. We gotta wait for Jsn_man to update the plugin, which I hope he does because I really like this plugin. :D
-
View User Profile
-
Send Message
Posted Dec 19, 2012Hi!
I get this error at every start:
" 2012-12-19 15:37:57 [INFO] This server is running CraftBukkit version git-Bukkit-1.4.5-R1.0-b2543jnks (MC: 1.4.5) (Implementing API version 1.4.5-R1.0) 2012-12-19 15:37:59 [SEVERE] Could not load 'plugins\Reforestation.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: net/minecraft/server/World at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230) at org.bukkit.craftbukkit.v1_4_5.CraftServer.loadPlugins(CraftServer.java:229) at org.bukkit.craftbukkit.v1_4_5.CraftServer.<init>(CraftServer.java:207) at net.minecraft.server.v1_4_5.ServerConfigurationManagerAbstract.<init>(ServerConfigurationManagerAbstract.java:52) at net.minecraft.server.v1_4_5.ServerConfigurationManager.<init>(SourceFile:11) at net.minecraft.server.v1_4_5.DedicatedServer.init(DedicatedServer.java:111) at net.minecraft.server.v1_4_5.MinecraftServer.run(MinecraftServer.java:398) at net.minecraft.server.v1_4_5.ThreadServerApplication.run(SourceFile:856) Caused by: java.lang.NoClassDefFoundError: net/minecraft/server/World at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173) ... 9 more Caused by: java.lang.ClassNotFoundException: net.minecraft.server.World at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:70) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 12 more "
Could you do something about it? =/
Thanks, HP
-
View User Profile
-
Send Message
Posted Dec 19, 2012This plugin fails to load on CB 1.4.5-R1.0. Could you please update it so we can use it? :)
-
View User Profile
-
Send Message
Posted Nov 17, 2012@Fluffgar
Thanks for the info! I will check it out!
-
View User Profile
-
Send Message
Posted Nov 17, 2012@Jsn_man
Sometimes i like to play in singleplayer, and i don't know a mod that does it, so would be easier to chop down trees and don't worry about replanting the saplings if i had a mod like your plugin, and sometimes i just play on LAN.
-
View User Profile
-
Send Message
Posted Nov 11, 2012@Jsn_man and also @joselitoeu
I already mentioned your plugin on the Nature Overhau [DAF] thread on the Minecraft Forum. The mod isn't updated yet but it does a similar job to your plugin but for SSP.
Also Zombe's Modpack contains a a mod called Plant Growth. The whole modpack must be installed but if you only need Plant Growth there are a bunch of classes, listed in the installation instructions, that you can just delete.
-
View User Profile
-
Send Message
Posted Nov 6, 2012@joselitoeu
I could do that, but why would I when you can just use the plugin?
-
View User Profile
-
Send Message
Posted Nov 6, 2012Hey, just wondering if you can make mod of this?
-
View User Profile
-
Send Message
Posted Oct 26, 2012@Jsn_man
In my server that never happened, this could be 2 things, the plugin i used control how the tree grows, so basically the tree grows but don't replace any block in the way, or was a plugin that protect the blocks preventing that to happen. Some players tried to grief the buildings dropping saplings near it, but when i checked the tree don't replaced any block, there was leaves inside the building, but don't replaced anything.