PwnPlantGrowth
PwnPlantGrowth
Change the rate at which all plants can grow (and die) per biome and based on natural lighting! Great for roleplaying, territory control, and economy minded servers where food is terribly overabundant and too easy to get.
The basics behind this plugin are designed to slow down or even disable the farming and growth of nearly every plant item in the game along with Biome specific support. Choose which Biomes and light level certain plant types can grow, and at what rates they can grow. You can also configure a chance that some plants will even die! (Replaced by dead bush or vine). This will make tending to massive farms more difficult, balancing your servers food economy and making the game more enjoyable for those who like a bit more realism and challenge.
Carrots, Melons, Wheat, Sugar Cane, Trees and more! The way this plugin works is that it checks for when a plant is about to grow, then based on your configuration settings it gives that growth event a chance to succeed or fail. If it fails, it also has a chance to die!
- Looking to block farming NetherWart entirely or restrict it to the Nether only like it used to be?
- Want to make some things like Melon farms less overpowered?
- Want to force Cocoa to only grow in the Jungle?
- Want to make desert growth rates lower than other areas?
- Want to make buckets pour water like real life buckets?
- Want to make farms be above ground and under natural lighting?
This is the plugin for you!
Features
- Configurable by plant type.
- Enable, disable or set a percentage of default for each plant's growth.
- Configure specific plant types that aren't commonly made available by other farming plugins (such as cactus, sugar cane and specific tree types)
- Whitelist Biomes that a plant can grow in.
- Add a configurable chance of death (plant dies and in some cases turns into a dead shrub).
- Configurable Per Biome for each plant type.
- Adjust the behavior of water source blocks in buckets and dispensers.
- Configurable natural light level.
- Give priority growth rates to certain biomes in outdoor farms while hampering growth rates in poor biomes and underground, great to get players out of their caves and into the world!
Installation
Simply place the PwnPlantGrowth.jar into your plugins folder and run your server! If you are upgrading from a previous version, it is a good idea to copy and delete your config.yml and regenerate a new one in case something has changed. (A future update will check for config file changes and errors)
Configuration
Edit plugins/PwnPlantGrowth/config.yml
- For each plant type, set the percentage from 0 to 100. 0 will disable the plant type from growing at all. 100 will allow plants to grow at their normal rate. The lower you set this number, the less likely the plant will be to grow.
- For each plant type, set a death percentage like above. This is a chance of death only if the above fail chance is successful. For example, if growth percent is 50% and death percent is also 50%, then the overall chance a plant has of dying is 25%.
- For each plant type, set a whitelist of biomes in which it can grow. And empty set means it can grow anywhere. Empty set looks like []
- For each plant type, configure option specific set of biomes, with their own growth and death rates.
Bukkit Biome List - There are a lot!
Links & Info
- PwnFilter - Absolutely the best and most powerful chat and command filtering plugin available. Also does aliases, scripting, sign and anvil text filtering and so much more.
- PwnBuckets - Previously part of PwnPlantGrowth, PwnBuckets grew into it's own plugin that makes liquids (water, lava, ice blocks) behave more naturally when poured from buckets or dispensed from dispensers.
- PwnChickenLay - Configure or block how fast chickens can lay eggs, and change the egg to any possible item.
- ResPwn - Configure useful and fun player respawn options like temporary forcefields, armor and weapons.
- PwnPvpBalance - Balance the tide of uneven game mechanics with options to help players with poor PvP skills be more competitive, and give good players a better challenge.
- Pwn9.com - Visit the Pwn9 Gaming Community, the place we call home. Check out our Minecraft servers, other game servers and fun gaming community.
Plugin Metrics
This plugin utilizes a plugin metrics system, which means that some information is collected and sent to bstats.org.
If you wish to disable this feature, you can do so by opting out, which you can do in the config file under /plugins/PluginMetrics/
@pilvimaa Not familiar with what spigot is doing with its config, but I hook the bukkit API's plant and structure grow events, and cancel when the server issues them based on the rate configuration.
Hm. I need to know how PwnPlantGrowth works. I'm trying to track down a bug I'm experiencing. I have growth ticks nerfed in Spigot from 650 chunks per tick to 1 chunk per tick but I'm still experiencing horribly fast growth.
Do you take full control of the growth with PwnPlantGrowth or do you just cancel growth events when the server issues them?
Because if you just cancel the events then this could be Spigot bug.
@pilvimaa I might have something done to get acacia and oak and fix the water problem tonight actually. But I have to re-address "trees" altogether.. originally i was going off the saplings:
Currently there are 6 saplings: - oak - spruce - birch - jungle - acacia - dark oak
each of those saplings can become various tree types based on biome and configuration, (like 4 saplings placed together for tall jungle. Unfortunately between minecraft and bukkit and even your picture is everyone has different published and backend names for all these. So ya i'm going to do a PPG1.5 for a quick fix, then in 1.6 i'll re-write the trees section more toward your post.. thanks for all the help i appreciate it!
@tremor77
What about the other new trees? They don't have new blocks per say but nonetheless they generate new kind of trees .. hmm. Let's see, here, take a look at this:
Hm, the image don't seem to fit in width ... here is a straight link: http:i.imgur.com/LWKUc3z.png
If it's of any help - to make your job easier you can make use of my settings for PwnPlantGrowth & Minecraft 1.7:
http:dev.bukkit.org/paste/pb6cz1as29w837nf/
On the top of the config I have list of technical names for all the biomes sorted by category. All 61 biomes. I pulled it from Bukkit source.
I also tried adding the trees in hopes that it would work. I could not find any reference in Bukkit code for Spruce that you had in the old config for 1.6.x. The names might have changed with the new mega taiga / taiga changes.
Well, hope this was of some use.
@pilvimaa It looks like I'll have some updates to do, thanks for the early testing. Here are a few things that I'll have to address.
1.7.2 Minecraft Changelog - http:minecraft.gamepedia.com/Version_history#1.7.2
1. New trees in 1.7.2 - Acacia and Dark Oak - This plugin will have to be updated for these, currently not supported in v1.4
2. New biomes should be supported natively just by using whatever biome name bukkit gives them (I'll post a list on this page this weekend).
3. Water - not sure what's up there, wondering if something in the event handler for water has changed. I'll need to do some research. It looks like bukkit is no longer allowing the asynchronous block remove.
4. Maybe i'll try and add support for the renewable flowers - sunflower, peony, rose and lilac, as they can be farmed for dye creation.
Looks like I'm going to be busy friday night (that's as early as I'll be able to start working on this).
Waterbucket prevention has broken with 1.7.2 (Spigot, build 1163). It crashes on console and lets player move water source blocks.
Error is here: http://dev.bukkit.org/paste/8953/
EDIT: It crashes if you put water in 1x1 hole. If you put the water out in the open it works like it's supposed to ... on second thought, no, no it doesn't .. the water drains but 1x1 source block stays there. The behaviour is very erratic.
Where can I see a list of all the names for the 1.7 biomes that I can use with PwnPlantGrowth?
EDIT: Never mind. I searched them up from Bukkit source code. But it would be useful to have the names of the biomes listed here.
EDIT2: So I can just ... check from Bukkit source all the tree names and biomes that are missing from PwnPlantGrowth config and fill it up and it should work?
@pilvimaa
Ya, thanks.. I'll have to review the changelog, not sure if there is anything in 1.7 that affects this plugin or not.. but I'll be sure to test out thoroughly and update... probably won't have a chance to until this weekend though.
Just a heads up. Bukkit has now released first actual 1.7.2 dev builds :-)
@pilvimaa
Thanks for the info. I haven't been testing with 1.7.2 yet, and I'm aware of spigot's growth implementations, I use spigot myself but i've always just used the default implementation.
In regards to the plants growing at night in false light, that's not denied by natural light setting, i suppose I should word/explain that differently. That setting basically forces plants to be exposed to skylight (even if it's nighttime) in order to grow, meaning not underground. I could add a second setting to restrict growth at night as well.
I could see how the double water bucket would be a hack around the source block.. I'll see if I can implement a solution for that.. thanks for the heads up. I know there are other plugins that handle ice blocks but to keep the plugin robust I'll work on an ice blocker too. Thanks!!!
Oh. By the way. I've been getting reports from my users that they can circumvent the water source block restrictions by using two buckets of water in a row.
EDIT: I forgot to mention, I'm not sure if this is because of the buggy 1.7.2 (protocol only) early version of Spigot or a bug in PwnPlantGrowth but the plants are growing at night in false light even though it's supposed to be denied. Light level setting is at 10. But the plants are not on the allow list. (Wheat)
EDIT2: On further reflection - I haven't tried it but... what about melting ice? You could create source blocks with that too unless you've taken steps to prevent it.
Seems to work very nicely.
For the people who have hard time understanding what is happening in their fields I would like to extend my small understanding in this matter. It's not as straight forward as the author makes it seem ;-) why? Because there are actually not one but several growth stages. We check several times for one plant - will it grow? Will it die? So we have to do probability calculations to find the actual plant survival rates.
Abouth the math behind this. If you want to figure out the actual survival rates for plants at death rate set to 100% you would calculate growth^growth stages/100^growth stages*100=%chance for plant survival.
If you wish to use other death rate than 100 you would have to take that into account in the calculations - which I have not done. The math for that would be a bit more complicated, you cant calculate that with this formula.
I prefer to use 100% death rate because that wont have such a hard to predict effect on the actual time it takes for something to grow. Instead I use Spigot server config to adjust the overall growth ticks.
So lets take an example with 91 growth and 100 death for wheat (wheat has 8 stages of growth):
(91^8)/(100^8)*100=47.02525
So in a field of 100 blocks we would have 53 dead plants and 47 plants alive.
Using death 100 you have to use high numbers 94-97 or more for growth unless you wish to make farming unfeasible for your users. Especially if you remove seed drops from grass like I do (with custom plugin).
Well, it's been fun. Hope this gives everyone a bit of insight into the probability calculations of growth with pwnplantgrowth.
Maybe someone with more solid grasp of the mathematics behind this can give the formula that takes also the varying death% into account but this works for me.
@Nickbbeezy
Just wondering if you got the 1.3 update and tried it out, let me know how it works out for you!
Version 1.3 is in queue for approval. It splits up the water bucket config and also adds a per biome extension to rates which has been a HUGE request for a while now. So... enjoy.
How Biome Specific Rates Work.
Let me know if you have any questions. You should be able to add this on to your current configurations easily enough. Check then config though there is also a change to waterbucket/dispenser configs.
@tremor77
That's even better than my idea, lol. Thanks for accepting it! I'll be sure to send in a contribution towards development pretty soon.
@Nickbbeezy Good ideas, I can break up the bucket and dispenser pretty easily. As for the weed killer perhaps a configurable block type that must be within a certain distance of the plant area? Perhaps like soulsand within 9 blocks and your plants won't die?
Would it be possible to have separate options for using water buckets directly and the dispensers. The two are fairly different. Some players like to use water buckets to build, while most of the time water buckets in dispensers are only used for automatic farms.
Also, any chance of adding a way for players to prevent their plants from dying? A few players suggested some form of weed killer to make an area immune to weeds for a set amount of time. Maybe, if a player uses bonemeal on a plant, it won't weed out during it's growth cycle and this resets after they break the fully grown plant.
@pilvimaa
That depends, you can give them a 0 or 100 percent death rate to customize that behavior.
As far as the growth by biomes goes, while I plan to do it, it's finding the free time to do it that is harder. I'm going to have for fork the project to a 2.0 branch for that because it's going to change so much of how the current one is laid out.
How are the plants handled in areas where they cannot grow? Will they die or just not grow .. ?
@tremor77
So ... we are still waiting for this growth by biomes you mentioned in the post earlier. Would you have time to code it this weekend or maybe the next weekend? Because, you know, if you don't do it - it won't get done. And it would be a really nice feature and I want you to do it this weekend.
Also while you're doing that add also setting for how abundant the crops are, ie. for wheat, potatoes, carrots. So we can set up, for example, 120% vanilla amount of drops in plains biome for wheat but only 60% of vanilla drops in taiga biome etc.
Config example:
Shouldn't take more than 2 days of coding and testing to implement.