I have exams, a job, and a family. I don't have all the time in the world xD
As soon as I can, I will make a tutorial, okay?
-DM
Rollback Post to RevisionRollBack
Eons ago, there was only void. Then came the big bang. Voxels colliding with voxels, cubes with cubes. Blocks were forming, each texture unique from the rest. That was when our universe was born.
Eons ago, there was only void. Then came the big bang. Voxels colliding with voxels, cubes with cubes. Blocks were forming, each texture unique from the rest. That was when our universe was born.
The Meaning of Life, the Universe, and Everything.
Join Date:
4/16/2011
Posts:
60
Minecraft:
alexbegt
Member Details
For world gen you do:
put this in your mod class:
public void generateSurface(World world, Random rand, int baseX, int baseZ)
{
for(int x = 0; x < 100; x++)
{
int Xcoord = baseX + rand.nextInt(16);
int Zcoord = baseZ + rand.nextInt(16);
int Ycoord = world.getHeightValue(Xcoord, 5);
(new WorldGenMinable(Deathore.blockID, 5)).generate(world, rand, Xcoord, Ycoord, Zcoord);
}
}
Replace Deathore.blockID with your block and the ycoord just edit the 5
Woohoo! A's on the exams. Now, for the tutorials...
I am going to study for Armor, Tools, upload the NPC code, and more!
Rollback Post to RevisionRollBack
Eons ago, there was only void. Then came the big bang. Voxels colliding with voxels, cubes with cubes. Blocks were forming, each texture unique from the rest. That was when our universe was born.
Eons ago, there was only void. Then came the big bang. Voxels colliding with voxels, cubes with cubes. Blocks were forming, each texture unique from the rest. That was when our universe was born.
Hey, I'm trying to get this block to attack stuff like a cactus, but it isn't wotking... Help please?
package net.minecraft.src;
import java.util.*;
public class NexusDamage extends Block
{
protected NexusDamage(int par1, int par2)
{
super(par1, par2, Material.rock);
}
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
{
par5Entity.attackEntityFrom(DamageSource.cactus, 4);
}
public int idDropped(int i, Random random)
{
return mod_RoTMB.NexusDamage.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
Okay, so after removing several more references to multiplayerWorld (idk how it was working with you when you made this, but it wasn't for me.), I finally finished the tree (it's supposed to be an ash tree). Now, first off, I made a test recipe where you just need one piece of dirt to craft 64 saplings and two pieces of dirt to craft 64 bones (for bonemeal for quick testing). The saplings have that annoying greyed-out wool texture in the hotbar, and the sapling looks fine once you place it. One major problem is that it seems to not be generating the wood at the center when I grow it out with the bonemeal. I will fool around with the code until I find something that works and I'll post it here. Also, this may just be an issue with my pc being slow as hell, but when I grow out the tree it is just a mass of bounding boxes (like the tree grew but didn't render for a bit, plus the sapling was still on the ground), then it finally spawned after about 30 seconds.
Like I said, I will mess with the code until I get it working then post the working code here (it was probably just something I did).
EDIT: Found it! (and fixed it ):
WorldGenTutorial.java:
the mod_Tutorial.Tutorial.blockID tripped me up, and I mistook it to mean "put the leaves here, force." Alas, that is where the wood is supposed to go... Oh well, now I gots meh tree!!!!11
Rollback Post to RevisionRollBack
"If you wish make an apple pie from scratch, you must first invent the universe." -- Carl Sagan
Okay, now I actually need some help :P. I have the tree working (I have yet to test world generation, still using sapling+bonemeal method), but I have one little thing that is annoying me. You see, when a tree spawns in minecraft, the logs usually run all the way up the tree, with one or two leaves on top, to make it more realistic. My trees aren't doing this.
As you can see (rather plainly, I know, I am going to call up my texture artist once the mod nears completion, or just do it myself :P), the logs run up to the leaves, then stop. I don't want this, for two reasons:
One, it doesn't fit in at all with the vanilla trees (again, the textures will actually look like trees in the end!).
And the other reason being that with the way this tree generates, you can only get a maximum of four-five logs from a single tree, as opposed to 7-8 from a vanilla small tree (obviously not including jungle trees, but I think that's a given).
Any help?
Rollback Post to RevisionRollBack
"If you wish make an apple pie from scratch, you must first invent the universe." -- Carl Sagan
Okay, I cannot seem to find the tree naturally in my world that I made after finishing the tree. How do I know if the tree can naturally generate? I need to find a method that doesn't involve walking around for hours.
Rollback Post to RevisionRollBack
"If you wish make an apple pie from scratch, you must first invent the universe." -- Carl Sagan
Okay, I cannot seem to find the tree naturally in my world that I made after finishing the tree. How do I know if the tree can naturally generate? I need to find a method that doesn't involve walking around for hours.
I have had the same problem
Rollback Post to RevisionRollBack
Eons ago, there was only void. Then came the big bang. Voxels colliding with voxels, cubes with cubes. Blocks were forming, each texture unique from the rest. That was when our universe was born.
Im thinking this might be because the tree is set to generate only in the desert, but it is only allowed to grow on grass or dirt in the coding. I would try changing the biome or adding sand as a block it can generate on, and then see what happens, but I m getting a few errors as well.
First off, multiplayerWorld and worldHeight are giving me errors wherever they are and I know you just have to change that to something else, but I'm not sure what to change them too.
Also setTickOnLoad is giving me an error in my leaves file, I think thats just an import but any help is appreciated.
Finally, in the generation code the part that says tree is giving me an error and I have no idea what to do for that.
Also this is just something small, but is there a way to make a multi textured log? Then it wouldn't look like there is bark everywhere.
Soon to add more tutorials, learning how to make a bow for the next update of these!!!
Rollback Post to RevisionRollBack
Eons ago, there was only void. Then came the big bang. Voxels colliding with voxels, cubes with cubes. Blocks were forming, each texture unique from the rest. That was when our universe was born.
Hey I figured out a working code for trees for 1.2.5 if you want me to send it to you
I have the correct stuff, I just need to update it XDD
Rollback Post to RevisionRollBack
Eons ago, there was only void. Then came the big bang. Voxels colliding with voxels, cubes with cubes. Blocks were forming, each texture unique from the rest. That was when our universe was born.
I have exams, a job, and a family. I don't have all the time in the world xD
As soon as I can, I will make a tutorial, okay?
-DM
put this in your mod class:
Replace Deathore.blockID with your block and the ycoord just edit the 5
I am going to study for Armor, Tools, upload the NPC code, and more!
What happens with them when you try to use them?
When I spawn a cow on it, the cow stays alive.
package net.minecraft.src;
import java.util.*;
public class NexusDamage extends Block
{
protected NexusDamage(int par1, int par2)
{
super(par1, par2, Material.rock);
}
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
{
par5Entity.attackEntityFrom(DamageSource.cactus, 4);
}
public int idDropped(int i, Random random)
{
return mod_RoTMB.NexusDamage.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
multiplayerWorld no longer exists in the vanilla code. If it does, they changed it, and eclipse isn't really giving any helpful quick fixes...
EDIT: Removing this if statement seems to do the trick! I recommend doing so in the tutorial!
Like I said, I will mess with the code until I get it working then post the working code here (it was probably just something I did).
EDIT: Found it! (and fixed it ):
WorldGenTutorial.java:
if (k2 == 0 || k2 == Block.leaves.blockID)
{
world.setBlockAndMetadata(i, j + l1, k, mod_Tutorial.Tutorial.blockID, 3);
}
the mod_Tutorial.Tutorial.blockID tripped me up, and I mistook it to mean "put the leaves here, force." Alas, that is where the wood is supposed to go... Oh well, now I gots meh tree!!!!11
As you can see (rather plainly, I know, I am going to call up my texture artist once the mod nears completion, or just do it myself :P), the logs run up to the leaves, then stop. I don't want this, for two reasons:
One, it doesn't fit in at all with the vanilla trees (again, the textures will actually look like trees in the end!).
And the other reason being that with the way this tree generates, you can only get a maximum of four-five logs from a single tree, as opposed to 7-8 from a vanilla small tree (obviously not including jungle trees, but I think that's a given).
Any help?
The Block.leaves.blockID needs to be changed to the leaves block from your mod, then you can have the trunk running up to the top of the tree!
I have had the same problem
Im thinking this might be because the tree is set to generate only in the desert, but it is only allowed to grow on grass or dirt in the coding. I would try changing the biome or adding sand as a block it can generate on, and then see what happens, but I m getting a few errors as well.
First off, multiplayerWorld and worldHeight are giving me errors wherever they are and I know you just have to change that to something else, but I'm not sure what to change them too.
Also setTickOnLoad is giving me an error in my leaves file, I think thats just an import but any help is appreciated.
Finally, in the generation code the part that says tree is giving me an error and I have no idea what to do for that.
Also this is just something small, but is there a way to make a multi textured log? Then it wouldn't look like there is bark everywhere.
Hey I figured out a working code for trees for 1.2.5 if you want me to send it to you
I have the correct stuff, I just need to update it XDD