“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Yes. Take a look at the last tutorial on the first post. It gives an example using blocks.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Can you make a tutorial on how to make a new door?
The only way I have found to be able to make textures work properly on the door is to use Forge. I am not using Forge on these tutorials so I won't be making a door tutorial. Sorry.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Hello
Its me again
Thanks for your fast answer, ill try to find other way to enchant my own items. If ill find something, ill let you know.
But i have another problem. I want to generate my own Ore (Impium) into nether. Im trying to use your tutorial about ore generation in specific biomes, but i dont understand one line.
WorldGen*** worldgen*** = new WorldGen***();
I dont know what to do with "***". Ive tried everything what im able to, but nothing worked. What am i supposed to do with it? In description of your tutorial you are talking only about BiomeGen, but not WorldGen.
Thanks for Your answer
AraXis
That is for structure generation in specific biomes, not ores. To generate in the nether you must create another WorldGenMinable class and change every Block.stone.blockID in it to Block.netherrack.blockID. We will call that class WorldGenMinableNetherBlock. Then just call it in your generateSurface method.
(new WorldGenMinableNetherBlock(Namehere.blockID, 25)).generate(world, random, randPosX, randPosY, randPosZ);
I'm adding a tutorial on it now, should be up in about 10-20 mins if you don't understand what I wrote above.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Uploaded tutorial for generating ores in the Nether. Also uploaded two parts of the GUI tutorial earlier today. Probably my most solid effort on these tutorials in a while. Yes, this entire post is in italics and it is meant to be that way :P.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Hello
Thanks for Your new tutorial
There is a problem with ore generation in Nether tutorial. Maybe im doing something wrong, but i checked and i think im not.
Ive used your WorldGenNetherMinableNamehere class and changed Namehere to name of my mod.
Second thing ive done is i changed my generateSurface code to this :
for(int i = 0; i < 7; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenNetherMinableFantasy(Impium.blockID, 25)).generate(world, random, randPosX, randPosY, randPosZ);
}
Logically, it should work. But it doesnt. In Nether i cant see any of my blocks (impium) after 15 mins of searching. Maybe i was unlucky, but i dont think i was.
Am i doing something wrong or there is problem with WorldGenNetherMinableNamehere ?
Is it working for You?
Thanks for Your answer
AraXis
It works in my mod. Try using this one. It should be the same as the other but I know that this one does work.
package net.minecraft.src;
import java.util.Random;
public class ModUndeadWorldGenUndeadNetherMinable extends WorldGenerator
{
/** The block ID of the ore to be placed using this generator. */
private int minableBlockId;
/** The number of blocks to generate. */
private int numberOfBlocks;
public ModUndeadWorldGenUndeadNetherMinable(int par1, int par2)
{
minableBlockId = par1;
numberOfBlocks = par2;
}
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
{
float f = par2Random.nextFloat() * (float)Math.PI;
double d = (float)(par3 + 8) + (MathHelper.sin(f) * (float)numberOfBlocks) / 8F;
double d1 = (float)(par3 + 8) - (MathHelper.sin(f) * (float)numberOfBlocks) / 8F;
double d2 = (float)(par5 + 8) + (MathHelper.cos(f) * (float)numberOfBlocks) / 8F;
double d3 = (float)(par5 + 8) - (MathHelper.cos(f) * (float)numberOfBlocks) / 8F;
double d4 = (par4 + par2Random.nextInt(3)) - 2;
double d5 = (par4 + par2Random.nextInt(3)) - 2;
for (int i = 0; i <= numberOfBlocks; i++)
{
double d6 = d + ((d1 - d) * (double)i) / (double)numberOfBlocks;
double d7 = d4 + ((d5 - d4) * (double)i) / (double)numberOfBlocks;
double d8 = d2 + ((d3 - d2) * (double)i) / (double)numberOfBlocks;
double d9 = (par2Random.nextDouble() * (double)numberOfBlocks) / 16D;
double d10 = (double)(MathHelper.sin(((float)i * (float)Math.PI) / (float)numberOfBlocks) + 1.0F) * d9 + 1.0D;
double d11 = (double)(MathHelper.sin(((float)i * (float)Math.PI) / (float)numberOfBlocks) + 1.0F) * d9 + 1.0D;
int j = MathHelper.floor_double(d6 - d10 / 2D);
int k = MathHelper.floor_double(d7 - d11 / 2D);
int l = MathHelper.floor_double(d8 - d10 / 2D);
int i1 = MathHelper.floor_double(d6 + d10 / 2D);
int j1 = MathHelper.floor_double(d7 + d11 / 2D);
int k1 = MathHelper.floor_double(d8 + d10 / 2D);
for (int l1 = j; l1 <= i1; l1++)
{
double d12 = (((double)l1 + 0.5D) - d6) / (d10 / 2D);
if (d12 * d12 >= 1.0D)
{
continue;
}
for (int i2 = k; i2 <= j1; i2++)
{
double d13 = (((double)i2 + 0.5D) - d7) / (d11 / 2D);
if (d12 * d12 + d13 * d13 >= 1.0D)
{
continue;
}
for (int j2 = l; j2 <= k1; j2++)
{
double d14 = (((double)j2 + 0.5D) - d8) / (d10 / 2D);
if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D && par1World.getBlockId(l1, i2, j2) == Block.netherrack.blockID)
{
par1World.setBlock(l1, i2, j2, minableBlockId);
}
}
}
}
}
return true;
}
}
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
1) Would it be possible to make trees with many different types of branches, leaves, bark, and wood (you break wood,you get bark and wood w/out bark is placed) or would I have to make it a generated structure?
Hey the tuts are awesome, I just have one problem:
How do I get my Custom Different Faced Block to face me when I place it? The stairs thing didnt work for me.
Its just a normal block, just different textures on the sides.
Thanks!
Loving the tutorials, they're great!
But can you make an advanced biome or world generation.
I've read through BiomeGenBase and found out that there are many aspects to change in generations. I.e - making extreme hills and such.
Here you go:
BlockexaltedDirt
package net.minecraft.src; import java.util.Random; public class BlockexaltedGround extends Block { protected BlockexaltedGround(int par1) { super(par1, Material.grass); this.setTickRandomly(true); } public int getBlockTextureFromSideAndMetadata(int par1, int par2) { return getBlockTextureFromSide(par1); } public int getBlockTextureFromSide(int par1) { if (par1 == 0) { return mod_TGAEM.eGroundbottom; } if (par1 == 1) { return mod_TGAEM.eGroundtop; } else { return mod_TGAEM.eGroundside; } } public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { if (!par1World.isRemote) { if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && Block.lightOpacity[par1World.getBlockId(par2, par3 + 1, par4)] > 2) { par1World.setBlockWithNotify(par2, par3, par4, mod_TGAEM.exaltedDirt.blockID); } else if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) { for (int var6 = 0; var6 < 4; ++var6) { int var7 = par2 + par5Random.nextInt(3) - 1; int var8 = par3 + par5Random.nextInt(5) - 3; int var9 = par4 + par5Random.nextInt(3) - 1; int var10 = par1World.getBlockId(var7, var8 + 1, var9); if (par1World.getBlockId(var7, var8, var9) == mod_TGAEM.exaltedDirt.blockID && par1World.getBlockLightValue(var7, var8 + 1, var9) >= 4 && Block.lightOpacity[var10] <= 2) { par1World.setBlockWithNotify(var7, var8, var9, mod_TGAEM.exaltedGround.blockID); } } } } } public int idDropped(int par1, Random random) { return mod_TGAEM.exaltedDirt.blockID; } public int quantityDropped(Random random) { return 1; } }BlockexaltedDirt
package net.minecraft.src; import java.util.Random; public class BlockexaltedDirt extends Block { protected BlockexaltedDirt(int par1) { super(par1, Material.ground); } public int idDropped(int par1, Random random) { return Block.dirt.blockID; } }Make sure the public static final line of exalted dirt is before exalted ground's.
together they are powerful beyond imagination."
thanks =D
Because every time I try to recompile it comes up with this error
cannot find symbol
Variable DragonScale
class net.minecraft.src.item
return Item.DragonScale.shiftedIndex
Edit
Never mind I found out how =D
Do you do the same with Items?
Yes. Take a look at the last tutorial on the first post. It gives an example using blocks.
together they are powerful beyond imagination."
The only way I have found to be able to make textures work properly on the door is to use Forge. I am not using Forge on these tutorials so I won't be making a door tutorial. Sorry.
together they are powerful beyond imagination."
That is for structure generation in specific biomes, not ores. To generate in the nether you must create another WorldGenMinable class and change every Block.stone.blockID in it to Block.netherrack.blockID. We will call that class WorldGenMinableNetherBlock. Then just call it in your generateSurface method.
I'm adding a tutorial on it now, should be up in about 10-20 mins if you don't understand what I wrote above.
together they are powerful beyond imagination."
together they are powerful beyond imagination."
It works in my mod. Try using this one. It should be the same as the other but I know that this one does work.
package net.minecraft.src; import java.util.Random; public class ModUndeadWorldGenUndeadNetherMinable extends WorldGenerator { /** The block ID of the ore to be placed using this generator. */ private int minableBlockId; /** The number of blocks to generate. */ private int numberOfBlocks; public ModUndeadWorldGenUndeadNetherMinable(int par1, int par2) { minableBlockId = par1; numberOfBlocks = par2; } public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) { float f = par2Random.nextFloat() * (float)Math.PI; double d = (float)(par3 + 8) + (MathHelper.sin(f) * (float)numberOfBlocks) / 8F; double d1 = (float)(par3 + 8) - (MathHelper.sin(f) * (float)numberOfBlocks) / 8F; double d2 = (float)(par5 + 8) + (MathHelper.cos(f) * (float)numberOfBlocks) / 8F; double d3 = (float)(par5 + 8) - (MathHelper.cos(f) * (float)numberOfBlocks) / 8F; double d4 = (par4 + par2Random.nextInt(3)) - 2; double d5 = (par4 + par2Random.nextInt(3)) - 2; for (int i = 0; i <= numberOfBlocks; i++) { double d6 = d + ((d1 - d) * (double)i) / (double)numberOfBlocks; double d7 = d4 + ((d5 - d4) * (double)i) / (double)numberOfBlocks; double d8 = d2 + ((d3 - d2) * (double)i) / (double)numberOfBlocks; double d9 = (par2Random.nextDouble() * (double)numberOfBlocks) / 16D; double d10 = (double)(MathHelper.sin(((float)i * (float)Math.PI) / (float)numberOfBlocks) + 1.0F) * d9 + 1.0D; double d11 = (double)(MathHelper.sin(((float)i * (float)Math.PI) / (float)numberOfBlocks) + 1.0F) * d9 + 1.0D; int j = MathHelper.floor_double(d6 - d10 / 2D); int k = MathHelper.floor_double(d7 - d11 / 2D); int l = MathHelper.floor_double(d8 - d10 / 2D); int i1 = MathHelper.floor_double(d6 + d10 / 2D); int j1 = MathHelper.floor_double(d7 + d11 / 2D); int k1 = MathHelper.floor_double(d8 + d10 / 2D); for (int l1 = j; l1 <= i1; l1++) { double d12 = (((double)l1 + 0.5D) - d6) / (d10 / 2D); if (d12 * d12 >= 1.0D) { continue; } for (int i2 = k; i2 <= j1; i2++) { double d13 = (((double)i2 + 0.5D) - d7) / (d11 / 2D); if (d12 * d12 + d13 * d13 >= 1.0D) { continue; } for (int j2 = l; j2 <= k1; j2++) { double d14 = (((double)j2 + 0.5D) - d8) / (d10 / 2D); if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D && par1World.getBlockId(l1, i2, j2) == Block.netherrack.blockID) { par1World.setBlock(l1, i2, j2, minableBlockId); } } } } } return true; } }together they are powerful beyond imagination."
1) Would it be possible to make trees with many different types of branches, leaves, bark, and wood (you break wood,you get bark and wood w/out bark is placed) or would I have to make it a generated structure?
2) How do I stop normal trees from spawning?
tanksin advanc
Kill two stones with one bird whenever possible
src\minecraft\net\minecraft\src\mod_ItemName.java:3: error: cannot find sy
public class mod_ItemName extends BaseMod
^
symbol: class BaseMod
src\minecraft\net\minecraft\src\mod_ItemName.java:9: error: cannot find sy
ItemName.iconIndex = ModLoader.addOverride("/gui/items.png
mage.png");
^
symbol: variable ModLoader
location: class mod_ItemName
src\minecraft\net\minecraft\src\mod_ItemName.java:10: error: cannot find s
ModLoader.addName(ItemName, "ItemName");
^
symbol: variable ModLoader
location: class mod_ItemName
src\minecraft\net\minecraft\src\mod_ItemName.java:11: error: cannot find s
ModLoader.addRecipe(new ItemStack(ItemName, 1), new Object
LLL", Character.valueOf('L'), Item.diamond,});
^
symbol: variable ModLoader
location: class mod_ItemName
4 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
any help?
How do I get my Custom Different Faced Block to face me when I place it? The stairs thing didnt work for me.
Its just a normal block, just different textures on the sides.
Thanks!
But can you make an advanced biome or world generation.
I've read through BiomeGenBase and found out that there are many aspects to change in generations. I.e - making extreme hills and such.
Thanks!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI know you can do it with forge but I was wondering how to do it with ModLoader.
Thanks