package net.minecraft.src;
import java.util.Random;
public class mod_Block extends BaseMod
{
public static final Block joshBlock = new BlockJosh (98,0).setHardness(1.0F).setResistance(5.0F).setBlockName("Josh").setLightValue(0F);
public mod_Block()
{
ModLoader.RegisterBlock(joshBlock);
joshBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/Anitk Tools/Antik.png");
ModLoader.AddName(joshBlock, "Antik");
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i=0; i < 30; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(joshBlock.blockID, 7)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public String Version()
{
return "3.14159265";
}
}
the error is after = new BlockJosh <-- thats the erorr
You are saying the block is called BlockJosh, when really it should say just Block.
Oh yeah, you're right, should be
package net.minecraft.src;
import java.util.Random;
public class mod_Block extends BaseMod
{
public static final BlockJosh joshBlock = new BlockJosh (98,0).setHardness(1.0F).setResistance(5.0F).setBlockName("Josh").setLightValue(0F);
public mod_Block()
{
ModLoader.RegisterBlock(joshBlock);
joshBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/Anitk Tools/Antik.png");
ModLoader.AddName(joshBlock, "Antik");
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i=0; i < 30; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(joshBlock.blockID, 7)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public String Version()
{
return "3.14159265";
}
}
or (though I wouldn't worry about this one)
public static final Block joshBlock = (Block)new BlockJosh(98,0).setHardness(1.0F).setResistance(5.0F).setBlockName("Josh").setLightValue(0F);
package net.minecraft.src;
import java.util.Random;
public class mod_Block extends BaseMod
{
public static final BlockJosh joshBlock = new BlockJosh (98,0).setHardness(1.0F).setResistance(5.0F).setBlockName("Josh").setLightValue(0F);
public mod_Block()
{
ModLoader.RegisterBlock(joshBlock);
joshBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/Anitk Tools/Antik.png");
ModLoader.AddName(joshBlock, "Antik");
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i=0; i < 30; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(joshBlock.blockID, 7)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public String Version()
{
return "3.14159265";
}
}
or (though I wouldn't worry about this one)
public static final Block joshBlock = (Block)new BlockJosh(98,0).setHardness(1.0F).setResistance(5.0F).setBlockName("Josh").setLightValue(0F);
the error is after = new BlockJosh <-- thats the erorr
Can you post the error?
Oh yeah, you're right, should be
or (though I wouldn't worry about this one)
figured it out thanks!!