package net.minecraft.src;
import java.util.Random;
public class mod_FloraCraft extends BaseMod
{
public static final BlockFlower BioFlower = (BlockFlower)(new BlockFlower(200, 12)).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setBlockName("BioFlower");
public mod_FloraCraft()
{
ModLoader.AddName(BioFlower, "BioFlower");
BioFlower.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/FloraCraft/BioFlower.png");
}
public String Version()
{
return "1.8.1";
}
public void GenerateSurface(World world, Random random, int i, int j)
{
for(int k = 0; k < 2; k++)
{
int a = i + random.nextInt(16) + 8;
int b = random.nextInt(128);
int c = j + random.nextInt(16) + 8;
(new WorldGenFlowers(BioFlower.blockID)).generate(world, random, a, b, c);
}
}
}
}
Heres my code. theres no errors anywhere in it its just the gray block in game
package net.minecraft.src;
import java.util.Random;
public class mod_FloraCraft extends BaseMod
{
public static Block BioFlower = (new BlockFlower(200, bioFlowerTexture)).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setBlockName("BioFlower");
public static int bioFlowerTexture = ModLoader.addOverride("/terrain.png", "/FloraCraft/BioFlower.png");
public mod_FloraCraft()
{
ModLoader.AddName(BioFlower, "BioFlower");
}
public String Version()
{
return "1.8.1";
}
public void GenerateSurface(World world, Random random, int i, int j)
{
for(int k = 0; k < 2; k++)
{
int a = i + random.nextInt(16) + 8;
int b = random.nextInt(128);
int c = j + random.nextInt(16) + 8;
(new WorldGenFlowers(BioFlower.blockID)).generate(world, random, a, b, c);
}
}
}
}
There is an error on the bioFlowerTexture saying cannot reference a field before it is defined
Listen and download: Volume Up, Windows Down
There is an error on the bioFlowerTexture saying cannot reference a field before it is defined