hey so im using mcp modloader and eclipse to start making a mod when i go to test it no ores will spawn custom or official i have 2 errors in the worldgenmineable.java file the red is were the errors are the error is "cannot cast from string to float"
for (int var19 = 0; var19 <= this.numberOfBlocks; ++var19)
here is the generation code for my custom ore
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
randomGenerator = random;
for (int i = 0; i < 1; i++)
{
int randPosX = chunkX + randomGenerator.nextInt(16);
int randPosY = random.nextInt(60);
int randPosZ = chunkZ + randomGenerator.nextInt(16);
(new WorldGenMinable(spectrumiteblock.blockID, 50)).generate(world, random, randPosX, randPosY, randPosZ);
Forge is an API, which means it interfaces with Minecraft and you can add in new blocks, items, etc without having to edit base classes. If you want an easier way, you can use ModLoader.
Forge is an API, which means it interfaces with Minecraft and you can add in new blocks, items, etc without having to edit base classes. If you want an easier way, you can use ModLoader.
public boolean generate(World par1World, Random par2Random, String randPosX, int par4, int par5)
{
float var6 = par2Random.nextFloat() * (float)Math.PI;
double var7 = (double)((float)(randPosX) + 8 - MathHelper.sin(var6) * (float)this.numberOfBlocks / 8.0F);
double var9 = (double)((float)(randPosX) + 8 - MathHelper.sin(var6) * (float)this.numberOfBlocks / 8.0F);
double var11 = (double)((float)(par5 + 8) + MathHelper.cos(var6) * (float)this.numberOfBlocks / 8.0F);
double var13 = (double)((float)(par5 + 8) - MathHelper.cos(var6) * (float)this.numberOfBlocks / 8.0F);
double var15 = (double)(par4 + par2Random.nextInt(3) - 2);
double var17 = (double)(par4 + par2Random.nextInt(3) - 2);
for (int var19 = 0; var19 <= this.numberOfBlocks; ++var19)
here is the generation code for my custom ore
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
randomGenerator = random;
for (int i = 0; i < 1; i++)
{
int randPosX = chunkX + randomGenerator.nextInt(16);
int randPosY = random.nextInt(60);
int randPosZ = chunkZ + randomGenerator.nextInt(16);
(new WorldGenMinable(spectrumiteblock.blockID, 50)).generate(world, random, randPosX, randPosY, randPosZ);
But if you wanna stay with a ClassLoader and not move to an API, have you tried cleaning MCP and re-decompiling?
nope didnt work whats the difference between forge and mcp eclipse?
Forge edits MCP and a *lot* of Minecraft when you set it up. Using MinecraftForge should remove pain like this.
How is it easier with ModLoader? Please tell me.
thanks il try out forge