Using block with metadata on surface biome

RonFall

Member
Content developer
Vacuum Horizon
May 5, 2016
81
15
8
24
I need specify block in my biome. I do it with the help of this code.
Code:
public byte topBlockMeta;
public byte fillerBlockMeta;
And registers it in his biome.
Code:
public class PlutoBiomeGenFlat extends PlutoBiomeGenBase {
   
   public PlutoBiomeGenFlat(int par1) {
      super(par1);
      super.topBlock = (byte) PlanetsBlocks.planetTop.blockID;
      super.topBlockMeta = 3;
      super.fillerBlock = (byte) PlanetsBlocks.planetMiddle.blockID;
      super.fillerBlockMeta = 3;
}
But when I go to his planet, I was falling down and eventually biome do not appears.
Help me please. Whats wrong?
 

Braanflakes

Member
Jun 11, 2013
12
4
3
29
The only kind of help I can offer is to make sure that the scope of where you declare topBlockMeta and fillerBlockMeta and where you use it are the same.
I can kind of see what's going on but without more context of what you're trying to do exactly, I can't help any more unfortunately. Sorry!
 

RonFall

Member
Content developer
Vacuum Horizon
May 5, 2016
81
15
8
24
The only kind of help I can offer is to make sure that the scope of where you declare topBlockMeta and fillerBlockMeta and where you use it are the same.
I can kind of see what's going on but without more context of what you're trying to do exactly, I can't help any more unfortunately. Sorry!
You need more code?
 

Braanflakes

Member
Jun 11, 2013
12
4
3
29
You need more code?

Well first, are you getting any errors at all? Second, I don't know what meta value of 3 corresponds to for the block you are trying to reference. Assuming that everything else is correct, I would think that the value you are assigning for the block meta is incorrect. For instance, coal only has meta values of 0 or 1, corresponding to coal or charcoal. If the block you are trying to set the meta value of does not have a meta value of 3, then that could be causing an issue.

In addition, make sure you are defining super.topBlock and super.fillerBlock correctly. I assume you are, you just didn't show it in your code.
 

RonFall

Member
Content developer
Vacuum Horizon
May 5, 2016
81
15
8
24
1. Errors do not have.
2. I have a separate class with metadata. A value of "3" is suitable.
Code:
Code:
public static final String[] top = new String[] {
        "top_Mercury",
        "top_Venus",
        "top_Ceres",
        "top_Pluto",
        "top_Makemake",
        "top_Eris"
    };
3. I have a meta value in the code.
BiomeGenBase
Code:
public class PlutoBiomeGenBase extends BiomeGenBase {
   
    public byte topBlockMeta;
    public byte fillerBlockMeta;
   
  public static final BiomeGenBase PlutoFlat = (new PlutoBiomeGenFlat(PlanetsBiomesID.ID_1)).setBiomeName("PlutoFlat");
  public static final BiomeGenBase PlutoSnow = (new PlutoBiomeGenSnow(PlanetsBiomesID.ID_2)).setBiomeName("PlutoSnow");

  public PlutoBiomeGenBase(int var1) {
      super(var1);
      this.biomeName = "Biomes";
  }

  public PlutoBiomeGenBase setColor(int var1) {
      return (PlutoBiomeGenBase)super.setColor(var1);
  }

  public float getSpawningChance() {
      return 1.0F;
  }

}
And I set a class where the surface of the biome.
PlutoFlat
Code:
public class PlutoBiomeGenFlat extends PlutoBiomeGenBase {
   
  public PlutoBiomeGenFlat(int par1) {
      super(par1);
      super.topBlock = (byte) PlanetsBlocks.planetTop.blockID;
      super.topBlockMeta = 3;
      super.fillerBlock = (byte) PlanetsBlocks.planetMiddle.blockID;
      super.fillerBlockMeta = 3;
      super.minHeight = 0.1F;
      super.maxHeight = 0.2F;
  }
 

Share this page