@Mod(modid="AutoSapling", version="1.0")
public class AutoSapling
{
public static final String MODID = "AutoSapling";
public static final String VERSION = "1.0";
@SidedProxy(clientSide="com.lemonscrap.AutoSap.ClientProxy", serverSide="com.lemonscrap.AutoSap.CommonProxy")
public static CommonProxy proxy;
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {}
@Mod.EventHandler
public void load(FMLInitializationEvent event)
{
MinecraftForge.EVENT_BUS.register(new Events());
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) {}
}
My mod doesn't control this, it's Minecraft's item despawn time of an item, which is set to 5 minutes, you would have to edit Minecraft's code, or create your own mod.
This is really useful! Just one request: could you add a config option so that instead of planting every sapling that the tree drops, it only plants one sapling on the block the trunk was, and the other saplings just drop normally?
Even if that were possible, I think that defeats part of the purpose of the mod, which is to have forests spread out a bit.
Still, there do need to be controls that ensure that the forests don't spread too quickly, or we'll have a Nausicaa Apocalypse on our hands. (Actually, now that's making me want a Nausicaa Apocalypse mod. Forests that spread all over and are toxic to enter....)
I think Nature Overhaul has a mechanic where they don't spawn within so many blocks of a tree. (I'm glad to see this alternative here because I hate having mods that do more than the mechanic I'm after.) You might also have them avoid spawning within so many blocks of desert biome or so many blocks of lava.
I favor a faster-despawn option if you could do it. Would be neat.
Rollback Post to RevisionRollBack
My YouTube channel is currently on hiatus, but I hope to get back to it at some point. Content is fairly random, but can be enjoyable, and is mostly game footage (mostly random Minecraft clips) from my nephews and me. Most popular MC vid so far is the one Vechs laughed at on Twitter!
There probably wont be one as most mods should be updated to 1.7.2 fairly soon.
http://i.imgur.com/APae9nY.png
http://i.imgur.com/PODfxji.png
http://i.imgur.com/DDIHBcd.png
Maybe it only happens with non-vanilla saplings?
Thanks for the pics! Just testing a possible solution now.
New build is avalible, it fixes most issues with planting on anything.
Hit that green button below if I helped~!
A Guide To Suggestion Ratings
Full Support
I love the idea; it is flawless.
Support
I like the idea. It has some minor problems but nothing which cannot be easily corrected.
Partial Support
I like some of the ideas but some I don't.
Partial Support II
I like the overall idea but the execution is bad
No Support
I don't support your idea
Extreme No Support
If this were to be added, I would be very cross.
Support Pending
If you fix a problem, I will support.
Support ________
Case by case usage.
Through forge, just install forge and drag it into your mods folder!
Hit that green button below if I helped~!
A Guide To Suggestion Ratings
Full Support
I love the idea; it is flawless.
Support
I like the idea. It has some minor problems but nothing which cannot be easily corrected.
Partial Support
I like some of the ideas but some I don't.
Partial Support II
I like the overall idea but the execution is bad
No Support
I don't support your idea
Extreme No Support
If this were to be added, I would be very cross.
Support Pending
If you fix a problem, I will support.
Support ________
Case by case usage.
When the item despawns (disappears) which is usually 5 minutes, they will plant.
When the item despawns (disappears) which is usually 5 minutes, they will plant.
oh! thanks for your post. This mod's helpful, great!
p/s: i want to edit some mod, what i found in this 4rum. So, what i should use?
Sorry my bad Eng
I'm sorry, I'm not sure what you mean.
Events.Class
package com.lemonscrap.AutoSap;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.item.ItemExpireEvent;
public class Events
{
@SubscribeEvent
public void itemDecay(ItemExpireEvent event)
{
EntityItem itemEntity = event.entityItem;
ItemStack itemstack = itemEntity.func_92059_d();
Item item = itemstack.func_77973_b();
double iX = itemEntity.field_70165_t;
double iY = itemEntity.field_70163_u;
double iZ = itemEntity.field_70161_v;
if ((Block.func_149634_a(item) instanceof BlockSapling)) {
if (itemEntity.field_70170_p.func_147437_c((int)iX, (int)iY, (int)iZ))
{
itemEntity.field_70170_p.func_147449_b((int)iX, (int)iY, (int)iZ, Block.func_149634_a(item));
int md = item.getDamage(itemstack);
itemEntity.field_70170_p.func_72921_c((int)iX, (int)iY, (int)iZ, md, 2);
itemEntity.field_70170_p.func_147464_a((int)iX, (int)iY, (int)iZ, Blocks.field_150345_g, 1);
}
}
}
}
AutoSapling.class
package com.lemonscrap.AutoSap;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.eventhandler.EventBus;
import net.minecraftforge.common.MinecraftForge;
@Mod(modid="AutoSapling", version="1.0")
public class AutoSapling
{
public static final String MODID = "AutoSapling";
public static final String VERSION = "1.0";
@SidedProxy(clientSide="com.lemonscrap.AutoSap.ClientProxy", serverSide="com.lemonscrap.AutoSap.CommonProxy")
public static CommonProxy proxy;
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {}
@Mod.EventHandler
public void load(FMLInitializationEvent event)
{
MinecraftForge.EVENT_BUS.register(new Events());
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) {}
}
Probably not
I can look into it, I was just concerned about a large amount of lag if someone dumps a bunch of saplings, I guess config options never hurt anyone.
Even if that were possible, I think that defeats part of the purpose of the mod, which is to have forests spread out a bit.
Still, there do need to be controls that ensure that the forests don't spread too quickly, or we'll have a Nausicaa Apocalypse on our hands. (Actually, now that's making me want a Nausicaa Apocalypse mod. Forests that spread all over and are toxic to enter....)
I think Nature Overhaul has a mechanic where they don't spawn within so many blocks of a tree. (I'm glad to see this alternative here because I hate having mods that do more than the mechanic I'm after.) You might also have them avoid spawning within so many blocks of desert biome or so many blocks of lava.
I favor a faster-despawn option if you could do it. Would be neat.
My YouTube channel is currently on hiatus, but I hope to get back to it at some point. Content is fairly random, but can be enjoyable, and is mostly game footage (mostly random Minecraft clips) from my nephews and me. Most popular MC vid so far is the one Vechs laughed at on Twitter!