Thanks so much! However it doesn't work, what you told me would work but its not working for me, I think its because of my trees. Instead of dropping saplings or apples it drops acacia saplings and the banana tree grows into an orange tree. I'm going to restart my trees
Does anyone have any tutorials out there for 1.7.10 on custom trees? I tried 1 tutorial and it seemed not to work so I want to know if anyone has a tutorial or anyone knows of a tutorial or if anyone can teach me how to make custom trees?
On the Minecraft forum, somebody has a planned tutorial about trees for Minecraft 1.7.10. I have search all over the internet for it. I found something for 1.7.2. I also find things saying "1.7.2/1.7.10." I hope episodes 61 - 63 work for you.
Hey baldwhin thanks for this video, this is the same modder I used to make my custom trees in the first place. But it didn't seem to work! I know your trying hard to solve this and I am so grateful of that! The only problem is, people who know how to do this, don't share it. I might have to wait into the planned tutorial becomes a tutorial.
Ok can someone help me with this, I have made my two trees, they work fine, the only problem is that the 2 trees I made drop acacia and dark oak saplings, I copied some of the coding for my leaves from vanilla (BlockNewLeaves) but I can't seem to find what is making the tree drop acacia and dark oak saplings (look at the first post of this thread to see my code) anyone have any ideas?
Sorry cant help with a tutorial or anything as iv never tried to make a custom tree but just from reading through your code i believe
public int damageDropped(int i)
{
return super.damageDropped(i) + 4;
}
is why your getting acacia saplings, 4 being the meta of acacia saplings. (provided it was handed 0) though look in the parent class to find what its being handed, or put System.out.println("number =" i); inside the damage dropped method
and adjust getdamagedropped to return the correct meta for your saplings
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
{
return Item.getItemFromBlock(Blocks.sapling);
}
@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
{
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
int chance = this.func_150123_b(metadata);
if (fortune > 0)
{
chance -= 2 << fortune;
if (chance < 10) chance = 10;
}
if (world.rand.nextInt(chance) == 0)
ret.add(new ItemStack(this.getItemDropped(metadata, world.rand, fortune), 1, this.damageDropped(metadata)));
change the if statement its all that's controlling the chance if you don't like how that vanilla method works change it you could use a random double generator and check its value this would be more or less like setting it as a percentage of chance to drop
Thanks so much! However it doesn't work, what you told me would work but its not working for me, I think its because of my trees. Instead of dropping saplings or apples it drops acacia saplings and the banana tree grows into an orange tree. I'm going to restart my trees
Does anyone have any tutorials out there for 1.7.10 on custom trees? I tried 1 tutorial and it seemed not to work so I want to know if anyone has a tutorial or anyone knows of a tutorial or if anyone can teach me how to make custom trees?
On the Minecraft forum, somebody has a planned tutorial about trees for Minecraft 1.7.10. I have search all over the internet for it. I found something for 1.7.2. I also find things saying "1.7.2/1.7.10." I hope episodes 61 - 63 work for you.
Can you post a link to this? t would be much appreciated
Oh sorry, I forgot to give you the hyperlink. I'm using a spoiler to save room.
Hey baldwhin thanks for this video, this is the same modder I used to make my custom trees in the first place. But it didn't seem to work! I know your trying hard to solve this and I am so grateful of that! The only problem is, people who know how to do this, don't share it. I might have to wait into the planned tutorial becomes a tutorial.
Have you made custom leaves for your trees?
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
yes, if you check the first post of this thread it has my code
Ok can someone help me with this, I have made my two trees, they work fine, the only problem is that the 2 trees I made drop acacia and dark oak saplings, I copied some of the coding for my leaves from vanilla (BlockNewLeaves) but I can't seem to find what is making the tree drop acacia and dark oak saplings (look at the first post of this thread to see my code) anyone have any ideas?
Your leaf class extends BlockLeaves, the code that's making it drop acacia saplings is probably in there.
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
Sorry cant help with a tutorial or anything as iv never tried to make a custom tree but just from reading through your code i believe
public int damageDropped(int i)
{
return super.damageDropped(i) + 4;
}
is why your getting acacia saplings, 4 being the meta of acacia saplings. (provided it was handed 0) though look in the parent class to find what its being handed, or put System.out.println("number =" i); inside the damage dropped method
If you extend BlockLeaves, you should only have to change the getItemDropped() method to return what you want.
Take mergis's advice. It makes perfect sense.
Here is all relevant source code.
change Blocks.sapling to your sapling base
and adjust getdamagedropped to return the correct meta for your saplings
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
{
return Item.getItemFromBlock(Blocks.sapling);
}
@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
{
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
int chance = this.func_150123_b(metadata);
if (fortune > 0)
{
chance -= 2 << fortune;
if (chance < 10) chance = 10;
}
if (world.rand.nextInt(chance) == 0)
ret.add(new ItemStack(this.getItemDropped(metadata, world.rand, fortune), 1, this.damageDropped(metadata)));
chance = 200;
if (fortune > 0)
{
chance -= 10 << fortune;
if (chance < 40) chance = 40;
}
this.captureDrops(true);
this.func_150124_c(world, x, y, z, metadata, chance); // Dammet mojang
ret.addAll(this.captureDrops(false));
return ret;
}
public int damageDropped(int p_149692_1_)
{
return p_149692_1_ & 3;
}
Thanks soo much for this! Just 1 question, what would my sapling base be?
Nvm figured it out!
OMG THANKS SOO MUCH!!!! THANKS EVERYONE FOR THEIR HELP AND SUPPORT, WORKS LIKE A CHARM NOW, THANKS!
Just 1 more thing!
How would I make this have a higher chance of spawning oranges?
protected void func_150124_c(World world, int x, int y, int z, int side, int meta)
{
if ((side & 3) == 0 && world.rand.nextInt(meta) == 0)
{
this.dropBlockAsItem(world, x, y, z, new ItemStack(MItems.Orange, 1, 0));
}
}
This should be posted in another thread, but all I know is how to change the x, y, and z axis. This is a very popular question.
Has it been solved by anyone? Do you know if someone has figured out how to do it?
change the if statement its all that's controlling the chance if you don't like how that vanilla method works change it you could use a random double generator and check its value this would be more or less like setting it as a percentage of chance to drop
where do I put the random double generator?