Jump to content

[SOLVED][1.5.1]Biome/Dimension Error


vandy22

Recommended Posts

Im making a dimension and for that I thought I might as well make a biome for it. So i went ahead and did that by changing a line of code in the WorldProvider. Anyways the point is in 1.5.1 for some reason when making a biome the only blocks you can use as grass, dirt, stone, etc have to be vanilla. I have tried to create my blocks in the actuall Block class thinking it may register it as a vanilla block but no luck. So now i get a dimension that only works with regular blocks, aka looks practiclly like overworld. I mean you could make the were the grass is supposed to be like wood for example or something like that. Here is my biome class it also has a tree generator if you are wondering what the other stuff is. Ill give you an example of code that does work and a example of code that doesnt work.

 

Code that does work(BiomeShine class):

package tutorial;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;

public class BiomeShine extends BiomeGenBase {

public BiomeShine(int par1) 
{
	super(par1);
	this.setBiomeName("Shrine Biome");
	this.fillerBlock = (byte) Block.dirt.blockID;
	this.topBlock = (byte) Block.wood.blockID;
	this.maxHeight = 0.5f;
	this.minHeight = 0;

}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
	super.decorate(par1World,par2Random,par3,par4);

	trees(par1World, par2Random,par3,par4);



}

public void trees(World par1World, Random par2Random, int par3, int par4)
{
	for(int a = 0; a < 20; a++)
	{
		int RandPosX = par3 + par2Random.nextInt(16);
		int RandPosY = par3 + par2Random.nextInt(128);
		int RandPosZ = par4 + par2Random.nextInt(16);
		(new WorldGenShrineTrees(true)).generate(par1World, par2Random, RandPosX, RandPosY, RandPosZ);

	}
}


}

 

Code that wouldnt work(BiomeShrine class):

package tutorial;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;

public class BiomeShine extends BiomeGenBase {

public BiomeShine(int par1) 
{
	super(par1);
	this.setBiomeName("Shrine Biome");
	this.fillerBlock = (byte) mod_tutorial.ShineDirt.blockID;
	this.topBlock = (byte) mod_tutorial.ShrineWood.blockID;
	this.maxHeight = 0.5f;
	this.minHeight = 0;

}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
	super.decorate(par1World,par2Random,par3,par4);

	trees(par1World, par2Random,par3,par4);



}

public void trees(World par1World, Random par2Random, int par3, int par4)
{
	for(int a = 0; a < 20; a++)
	{
		int RandPosX = par3 + par2Random.nextInt(16);
		int RandPosY = par3 + par2Random.nextInt(128);
		int RandPosZ = par4 + par2Random.nextInt(16);
		(new WorldGenShrineTrees(true)).generate(par1World, par2Random, RandPosX, RandPosY, RandPosZ);

	}
}


}

 

As you can see if I use a block that is made by me(aka not vanilla) it will not work. I've seen people also asking this question in other forums and yet no answer, I also know i have never not recived a responce of some sort from this forum which is why I always post here :D. Anyway's I really hope one of you out there looking at this knows how to fix and will answer because this will help alot of people!!!!

Link to comment
Share on other sites

Wow it would be something that simple! THANKS :D, it worked!! A couple other questions for anyone that can answer: is there anyway to make it day in my dimension? In my Shine Dimension its so dark i can barley see the ground, its weird because the moon and sun are on both horizons but different sides. Also is there anyway to have a custom stone, i have it all ready to go and work but i dont know how to make it work.!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.