That is to say, during initialization you can set "BiomeGenBase.plains.theBiomeDecorator.treesPerChunk" to whatever value you want (BiomeDecorator.treesPerChunk is not private or final); 0 will give a 10% chance of an oak tree per chunk (10% of these will be large oaks), which is the "default" tree frequency (e.g. ocean and river biomes do not set this field to anything and will have the occasional tree as a result; if you set it to 1 the real frequency will be 1.1 trees per chunk (10% of 2 instead of 1), and so on).
This may not be the "proper" way to do things but this is how I've done such things (using MCP, not Forge) to avoid modifying or replacing more classes than necessary.
That is to say, during initialization you can set "BiomeGenBase.plains.theBiomeDecorator.treesPerChunk" to whatever value you want (BiomeDecorator.treesPerChunk is not private or final); 0 will give a 10% chance of an oak tree per chunk (10% of these will be large oaks), which is the "default" tree frequency (e.g. ocean and river biomes do not set this field to anything and will have the occasional tree as a result; if you set it to 1 the real frequency will be 1.1 trees per chunk (10% of 2 instead of 1), and so on).
This may not be the "proper" way to do things but this is how I've done such things (using MCP, not Forge) to avoid modifying or replacing more classes than necessary.
Thanks for the reply. I had thought of accomplishing this with MCP when I seen the exact same bit of code you posted, as I've also used it in the past for the same reason you state, but I'm trying to only use Forge. I've found a mod that, with further study, should help me to understand how to achieve this with Forge. And just in case, I do understand that 1.7.10, along with it's accompanying version of Forge, is outdated but there's just something about these versions that keep drawing me back. For now (probably a few days), this is on hold while I learn how to update what I do have to 1.14.4. and study more on that mod I found.
Looking for some direction (methods and references) that will help me add vanilla oak trees to vanilla plains. Examples are greatly appreciated.
I don't know about Forge 1.7.10 but you could do this by simply changing the value of a field (code from MCP 1.6.4):
That is to say, during initialization you can set "BiomeGenBase.plains.theBiomeDecorator.treesPerChunk" to whatever value you want (BiomeDecorator.treesPerChunk is not private or final); 0 will give a 10% chance of an oak tree per chunk (10% of these will be large oaks), which is the "default" tree frequency (e.g. ocean and river biomes do not set this field to anything and will have the occasional tree as a result; if you set it to 1 the real frequency will be 1.1 trees per chunk (10% of 2 instead of 1), and so on).
This may not be the "proper" way to do things but this is how I've done such things (using MCP, not Forge) to avoid modifying or replacing more classes than necessary.
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
Thanks for the reply. I had thought of accomplishing this with MCP when I seen the exact same bit of code you posted, as I've also used it in the past for the same reason you state, but I'm trying to only use Forge. I've found a mod that, with further study, should help me to understand how to achieve this with Forge. And just in case, I do understand that 1.7.10, along with it's accompanying version of Forge, is outdated but there's just something about these versions that keep drawing me back. For now (probably a few days), this is on hold while I learn how to update what I do have to 1.14.4. and study more on that mod I found.
So, here's how I added trees to plains in 1.7.10
1. Create a class, subscribe to the "Decorate" event and get to the settings of the biome.
2. Register it in the main class by putting this...
MinecraftForge.TERRAIN_GEN_BUS.register(new YourClassName());
within (FMLPreInitializationEvent event)
3.Import YourClassName into the main class
*alternatively, if you don't need the loop, you can get straight to the point like this...
BiomeGenBase.plains.theBiomeDecorator.treesPerChunk = 0;