Jump to content

[1.8] Cannot find my custom biome!


Arionas_MC

Recommended Posts

Hello guys! I am currently coding a mod with a lot of new biomes, but I cannot find them! I register every biome like this:

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    
    BiomeDictionary.registerBiomeType(exampleForest, Type.FOREST);
    BiomeManager.addSpawnBiome(exampleForest);
    	
}

Do I register them correctly?

(I am using MinecraftForge 1.8-11.14.2.1427)

Link to comment
Share on other sites

3 minutes ago, Jacky2611 said:

That brings back memories...

 

I used BiomeManager.addBiome() in 1.8

I THINK that addSpawnBiome only means that it is possible that the world spawn is inside the specified Biome.

Is there any way to see if my biome has been spawned?

Link to comment
Share on other sites

Just now, Jacky2611 said:

It might be WorldChunkManager.a(int i, int j, int k, List<Biome> list, Random random)

 

BiomeProvider might be a renamed WorldChunkManager in 1.9.

Hey, whenever I register my biome with BiomeManager.addBiome, the Minecraft world doesn't start!

Link to comment
Share on other sites

When I start a new world with that line of code it prints this:

[18:53:16] [Server thread/INFO]: Starting integrated minecraft server version 1.8
[18:53:16] [Server thread/INFO]: Generating keypair
[18:53:16] [Server thread/INFO]: Converting map!
[18:53:16] [Server thread/INFO]: Scanning folders...
[18:53:16] [Server thread/INFO]: Total conversion count is 0
[18:53:16] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
[18:53:16] [Server thread/INFO] [FML]: Applying holder lookups
[18:53:16] [Server thread/INFO] [FML]: Holder lookups applied
[18:53:16] [Server thread/INFO] [FML]: Loading dimension 0 (New World2) (net.minecraft.server.integrated.IntegratedServer@2bd0b9f)
[18:53:17] [Server thread/INFO] [FML]: Loading dimension 1 (New World2) (net.minecraft.server.integrated.IntegratedServer@2bd0b9f)
[18:53:17] [Server thread/INFO] [FML]: Loading dimension -1 (New World2) (net.minecraft.server.integrated.IntegratedServer@2bd0b9f)
[18:53:17] [Server thread/INFO]: Preparing start region for level 0
[18:53:18] [Server thread/INFO]: Preparing spawn area: 6%
[18:53:19] [Server thread/INFO]: Preparing spawn area: 10%
[18:53:20] [Server thread/INFO]: Preparing spawn area: 14%
[18:53:21] [Server thread/INFO]: Preparing spawn area: 20%
[18:53:22] [Server thread/INFO]: Preparing spawn area: 27%
[18:53:23] [Server thread/INFO]: Preparing spawn area: 35%
[18:53:24] [Server thread/INFO]: Preparing spawn area: 44%
[18:53:25] [Server thread/INFO]: Preparing spawn area: 54%
[18:53:26] [Server thread/INFO]: Preparing spawn area: 64%
[18:53:27] [Server thread/INFO]: Preparing spawn area: 75%

And it stops at 75%

 

My Code:

Biome Class:

Spoiler

public class BiomeGenWoods extends BiomeGenBase {

	public BiomeGenWoods(int par1)
	{
		super(par1);
		this.spawnableCreatureList.clear();
		this.topBlock = Blocks.grass.getDefaultState();
		this.fillerBlock = Blocks.dirt.getDefaultState();
		this.spawnableCreatureList.clear();
		this.spawnableMonsterList.clear();
		this.spawnableWaterCreatureList.clear();
		
		
		this.setHeight(height_LowPlains);
		
		
		
	}

	@Override
	public void decorate(World par1World, Random par2Random, BlockPos pos)
	{
		super.decorate(par1World, par2Random, pos);

		for(int i = 0; i < par2Random.nextInt(30); i++) {
			int x = par2Random.nextInt(16) + 8;
			int z = par2Random.nextInt(16) + 8;
			int y = par2Random.nextInt(par1World.getHorizon(pos.add(x, 0, z)).getY() + 32);
			
			WorldGenDiamondTree worldGenDiamondTree = new WorldGenDiamondTree();
			worldGenDiamondTree.generate(par1World, par2Random, pos.add(x,y,z));
			
		
		}
	}

	
	
}

 

Diamond Tree Class:

Spoiler

public class WorldGenDiamondTree extends WorldGenerator{
	
	int height;
	IBlockState wood = Blocks.diamond_block.getDefaultState();
	IBlockState leaf = Blocks.emerald_block.getDefaultState();

	public boolean generate(World world, Random random, BlockPos pos)
	{
	
			while (world.isAirBlock(pos.down()) && pos.getY() > 55)
			{
				pos.subtract(new Vec3i(0, 1, 0));
			}
			if (!world.isAirBlock(pos))
				return false;

			height = 5 + random.nextInt(5);

			for (int i = 0; i < height; i++)
			{
				world.setBlockState(pos.up(i), wood);
			}

			int top = 1 + random.nextInt(3);

			int left = 2 + random.nextInt(3);
			int right = 2 + random.nextInt(3);
			int front = 2 + random.nextInt(3);
			int back = 2 + random.nextInt(3);

			for (int i = 0; i < top; i++)
			{
				setBlock(world, pos.getX(), pos.getY() + i, pos.getZ(), wood);

				if (i > 0)
				{
					setBlock(world, pos.getX() + 1, pos.getY() + i, pos.getZ(), leaf);
					setBlock(world, pos.getX() - 1, pos.getY() + i, pos.getZ(), leaf);
					setBlock(world, pos.getX(), pos.getY() + i, pos.getZ() + 1, leaf);
					setBlock(world, pos.getX(), pos.getY() + i, pos.getZ() - 1, leaf);
					setBlock(world, pos.getX(), pos.getY() + i + 1, pos.getZ(), leaf);
				}
			}

			for (int i = 0; i < left; i++)
			{
				setBlock(world, pos.getX() + i, pos.getY(), pos.getZ(), wood);
				setBlock(world, pos.getX() + i, pos.getY() + 1, pos.getZ(), leaf);
				if (i > 0)
				{
					setBlock(world, pos.getX() + i, pos.getY(), pos.getZ() + 1, leaf);
					setBlock(world, pos.getX() + i, pos.getY(), pos.getZ() - 1, leaf);
				}
			}
			for (int i = 0; i < right; i++)
			{
				setBlock(world, pos.getX() - i, pos.getY(), pos.getZ(), wood);
				setBlock(world, pos.getX() - i, pos.getY() + 1, pos.getZ(), leaf);
				if (i > 0)
				{
					setBlock(world, pos.getX() - i, pos.getY(), pos.getZ() + 1, leaf);
					setBlock(world, pos.getX() - i, pos.getY(), pos.getZ() - 1, leaf);
				}
			}
			for (int i = 0; i < front; i++)
			{
				setBlock(world, pos.getX(), pos.getY(), pos.getZ() + i, wood);
				setBlock(world, pos.getX(), pos.getY() + 1, pos.getZ() + i, leaf);
				if (i > 0)
				{
					setBlock(world, pos.getX() - 1, pos.getY(), pos.getZ() + i, leaf);
					setBlock(world, pos.getX() + 1, pos.getY(), pos.getZ() + i, leaf);
				}
			}
			for (int i = 0; i < back; i++)
			{
				setBlock(world, pos.getX(), pos.getY(), pos.getZ() - i, wood);
				setBlock(world, pos.getX(), pos.getY() + 1, pos.getZ() - i, leaf);
				if (i > 0)
				{
					setBlock(world, pos.getX() - 1, pos.getY(), pos.getZ() - i, leaf);
					setBlock(world, pos.getX() + 1, pos.getY(), pos.getZ() - i, leaf);
				}
			}

			setBlock(world, pos.getX() + left, pos.getY(), pos.getZ(), leaf);
			setBlock(world, pos.getX() - right, pos.getY(), pos.getZ(), leaf);
			setBlock(world, pos.getX(), pos.getY(), pos.getZ() + front, leaf);
			setBlock(world, pos.getX(), pos.getY(), pos.getZ() - back, leaf);

			return true;
	
	}

	public void setBlock(World world, int x, int y, int z, IBlockState block)
	{
		world.setBlockState(new BlockPos(x, y + height, z), block);
	}
}

 

Main Class(register code):

Spoiler

public static BiomeGenBase diamondWoods = new BiomeGenWoods(52).setBiomeName("DiamondWoods");

@EventHandler
    public void preInit(FMLPreInitializationEvent event) {

    //	BiomeDictionary.registerBiomeType(diamondWoods, Type.FOREST);
    //	BiomeManager.addSpawnBiome(diamondWoods);
    
    	BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(diamondWoods, 10));

    }

 

 

Link to comment
Share on other sites

1 minute ago, Arionas_MC said:

When I start a new world with that line of code it prints this:

Good news your Biome is generating. Bad news you are generating to many trees.

 

2 minutes ago, Arionas_MC said:

for(int i = 0; i < par2Random.nextInt(30); i++) {

30 possible trees per chunk is a little to much.

  • Like 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

1 minute ago, Arionas_MC said:

Thanks, the world starts now! But I cannot find my biome again!:(

In your decorate method print out the BlockPos argument to find the position.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Just now, Arionas_MC said:

When does it print the position?

What do you mean? If you do System.out.println(pos) it will print out the BlockPos and you will have coordinates for where your Biome is being decorated.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

It will print the position whenever your biome get decorated.

 

However, that would require your biome to be generated first. I would instead somehow (e.g. on item right click) run WorldChunkManager.a(int i, int j, int k, List<Biome> list, Random random) and print the result. If this really is the findBiome function it should work even if your biome hasn't been generated yet. Just make sure that the range is big enough.

Edited by Jacky2611
  • Like 1

Here could be your advertisement!

Link to comment
Share on other sites

1 minute ago, Animefan8888 said:

What do you mean? If you do System.out.println(pos) it will print out the BlockPos and you will have coordinates for where your Biome is being decorated.

Well after 5 minutes of exploring the world, it printed the position but Minecraft stopped responding!

Link to comment
Share on other sites

Just now, Arionas_MC said:

Well after 5 minutes of exploring the world, it printed the position but Minecraft stopped responding!

Post your Biome code again.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

3 minutes ago, Jacky2611 said:

Your biome might still be taking up too many resources. How much power does your device have and how much are you generating?

[19:14:25] [Client thread/INFO] [STDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:235]: ---- Minecraft Crash Report ----
// I let you down. Sorry :(

Time: 7/18/17 7:14 PM
Description: Loading screen debug info

This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
	Minecraft Version: 1.8
	Operating System: Windows 7 (amd64) version 6.1
	Java Version: 1.8.0_77, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 719523512 bytes (686 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: 
	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 361.43' Renderer: 'GeForce GTS 450/PCIe/SSE2'

 

Link to comment
Share on other sites

4 minutes ago, Arionas_MC said:

I changed the number of trees which are being generated from random.nextInt(30) to random.nextInt(7)+1

How big are your trees? If they are near vanilla size you shouldn't be generating much more than 3-4 per chunk, also there is Runaway Chunk Generation. Which is a huge problem in world gen. If your generation passes over into another chunk then that chunk will be forced to generate and so on and so forth if it is your Biome it will call your decorate method and lead to more chunks being loaded.

 

Edit: You will want to apply an offset to your generation so it doesn't load other chunks.

Edited by Animefan8888

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

1 minute ago, Animefan8888 said:

How big are your trees? If they are near vanilla size you shouldn't be generating much more than 3-4 per chunk, also there is Runaway Chunk Generation. Which is a huge problem in world gen. If your generation passes over into another chunk then that chunk will be forced to generate and so on and so forth if it is your Biome it will call your decorate method and lead to more chunks being loaded.

Their height is 5+random.nextInt(5)

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Dalam dunia perjudian online yang berkembang pesat, mencari platform yang dapat memberikan kemenangan maksimal dan hasil terbaik adalah impian setiap penjudi. OLXTOTO, dengan bangga, mempersembahkan dirinya sebagai jawaban atas pencarian itu. Sebagai platform terbesar untuk kemenangan maksimal dan hasil optimal, OLXTOTO telah menciptakan gelombang besar di komunitas perjudian online. Satu dari banyak keunggulan yang dimiliki OLXTOTO adalah koleksi permainan yang luas dan beragam. Dari togel hingga slot online, dari live casino hingga permainan kartu klasik, OLXTOTO memiliki sesuatu untuk setiap pemain. Dibangun dengan teknologi terkini dan dikembangkan oleh para ahli industri, setiap permainan di platform ini dirancang untuk memberikan pengalaman yang tak tertandingi bagi para penjudi. Namun, keunggulan OLXTOTO tidak hanya terletak pada variasi permainan yang mereka tawarkan. Mereka juga menonjol karena komitmen mereka terhadap keamanan dan keadilan. Dengan sistem keamanan tingkat tinggi dan proses audit yang ketat, OLXTOTO memastikan bahwa setiap putaran permainan berjalan dengan adil dan transparan. Para pemain dapat merasa aman dan yakin bahwa pengalaman berjudi mereka di OLXTOTO tidak akan terganggu oleh masalah keamanan atau keadilan. Tak hanya itu, OLXTOTO juga terkenal karena layanan pelanggan yang luar biasa. Tim dukungan mereka selalu siap sedia untuk membantu para pemain dengan segala pertanyaan atau masalah yang mereka hadapi. Dengan respon cepat dan solusi yang efisien, OLXTOTO memastikan bahwa pengalaman berjudi para pemain tetap mulus dan menyenangkan. Dengan semua fitur dan keunggulan yang ditawarkannya, tidak mengherankan bahwa OLXTOTO telah menjadi pilihan utama bagi jutaan penjudi online di seluruh dunia. Jika Anda mencari platform yang dapat memberikan kemenangan maksimal dan hasil optimal, tidak perlu mencari lebih jauh dari OLXTOTO. Bergabunglah dengan OLXTOTO hari ini dan mulailah petualangan Anda menuju kemenangan besar dan hasil terbaik!
    • Selamat datang di OLXTOTO, situs slot gacor terpanas yang sedang booming di industri perjudian online. Jika Anda mencari pengalaman bermain yang luar biasa, maka OLXTOTO adalah tempat yang tepat untuk Anda. Dapatkan sensasi tidak biasa dengan variasi slot online terlengkap dan peluang memenangkan jackpot slot maxwin yang sering. Di sini, Anda akan merasakan keseruan yang luar biasa dalam bermain judi slot. DAFTAR OLXTOTO DISINI LOGIN OLXTOTO DISINI AKUN PRO OLXTOTO DISINI   Jackpot Slot Maxwin Sering Untuk Peluang Besar Di OLXTOTO, kami tidak hanya memberikan hadiah slot biasa, tapi juga memberikan kesempatan kepada pemain untuk memenangkan jackpot slot maxwin yang sering. Dengan demikian, Anda dapat meraih keberuntungan besar dan memenangkan ribuan rupiah sebagai hadiah jackpot slot maxwin kami. Jackpot slot maxwin merupakan peluang besar bagi para pemain judi slot untuk meraih keuntungan yang lebih besar. Dalam permainan kami, Anda tidak harus terpaku pada kemenangan biasa saja. Kami hadir dengan jackpot slot maxwin yang sering, sehingga Anda memiliki peluang yang lebih besar untuk meraih kemenangan besar dengan hadiah yang menggiurkan. Dalam permainan judi slot, pengalaman bermain bukan hanya tentang keseruan dan hiburan semata. Kami memahami bahwa para pemain juga menginginkan kesempatan untuk meraih keberuntungan besar. Oleh karena itu, OLXTOTO hadir dengan jackpot slot maxwin yang sering untuk memberikan peluang besar kepada para pemain kami. Peluang Besar Menang Jackpot Slot Maxwin Peluang menang jackpot slot maxwin di OLXTOTO sangatlah besar. Anda tidak perlu khawatir tentang batasan atau pembatasan dalam meraih jackpot tersebut. Kami ingin memberikan kesempatan kepada semua pemain kami untuk merasakan sensasi menang dalam jumlah yang luar biasa. Jackpot slot maxwin kami dibuka untuk semua pemain judi slot di OLXTOTO. Anda memiliki peluang yang sama dengan pemain lainnya untuk memenangkan hadiah jackpot yang besar. Kami percaya bahwa semua orang memiliki kesempatan untuk meraih keberuntungan besar, dan itulah mengapa kami menyediakan jackpot slot maxwin yang sering untuk memenuhi harapan dan keinginan Anda.   Kesimpulan OLXTOTO adalah situs slot gacor terbaik yang memberikan pengalaman bermain judi slot online yang tak terlupakan. Dengan variasi slot online terlengkap dan peluang memenangkan jackpot slot maxwin yang sering, OLXTOTO menjadi pilihan terbaik bagi para pemain yang mencari kesenangan dan kemenangan besar dalam perjudian online. Di samping itu, OLXTOTO juga menawarkan layanan pelanggan yang ramah dan responsif, siap membantu setiap pemain dalam mengatasi masalah teknis atau pertanyaan seputar perjudian online. Kami menjaga integritas game dan memberikan lingkungan bermain yang adil serta menjalankan kebijakan perlindungan pelanggan yang cermat. Bergabunglah dengan OLXTOTO sekarang dan nikmati pengalaman bermain slot online yang luar biasa. Jadilah bagian dari komunitas perjudian yang mengagumkan ini dan raih kesempatan untuk meraih kemenangan besar. Dapatkan akses mudah dan praktis ke situs OLXTOTO dan rasakan sensasi bermain judi slot yang tak terlupakan.  
    • OLXTOTO: Platform Maxwin dan Gacor Terbesar Sepanjang Masa Di dunia perjudian online yang begitu kompetitif, mencari platform yang dapat memberikan kemenangan maksimal (Maxwin) dan hasil terbaik (Gacor) adalah prioritas bagi para penjudi yang cerdas. Dalam upaya ini, OLXTOTO telah muncul sebagai pemain kunci yang mengubah lanskap perjudian online dengan menawarkan pengalaman tanpa tandingan.     Sejak diluncurkan, OLXTOTO telah menjadi sorotan industri perjudian online. Dikenal sebagai "Platform Maxwin dan Gacor Terbesar Sepanjang Masa", OLXTOTO telah menarik perhatian pemain dari seluruh dunia dengan reputasinya yang solid dan kinerja yang luar biasa. Salah satu fitur utama yang membedakan OLXTOTO dari pesaingnya adalah komitmen mereka untuk memberikan pengalaman berjudi yang unik dan memuaskan. Dengan koleksi game yang luas dan beragam, termasuk togel, slot online, live casino, dan banyak lagi, OLXTOTO menawarkan sesuatu untuk semua orang. Dibangun dengan teknologi terkini dan didukung oleh tim ahli yang berdedikasi, platform ini memastikan bahwa setiap pengalaman berjudi di OLXTOTO tidak hanya menghibur, tetapi juga menguntungkan. Namun, keunggulan OLXTOTO tidak hanya terletak pada permainan yang mereka tawarkan. Mereka juga terkenal karena keamanan dan keadilan yang mereka berikan kepada para pemain mereka. Dengan sistem keamanan tingkat tinggi dan audit rutin yang dilakukan oleh otoritas regulasi independen, para pemain dapat yakin bahwa setiap putaran permainan di OLXTOTO adalah adil dan transparan. Tidak hanya itu, OLXTOTO juga dikenal karena layanan pelanggan yang luar biasa. Dengan tim dukungan yang ramah dan responsif, para pemain dapat yakin bahwa setiap pertanyaan atau masalah mereka akan ditangani dengan cepat dan efisien. Dengan semua fitur dan keunggulan yang ditawarkannya, tidak mengherankan bahwa OLXTOTO telah menjadi platform pilihan bagi para penjudi online yang mencari kemenangan maksimal dan hasil terbaik. Jadi, jika Anda ingin bergabung dengan jutaan pemain yang telah merasakan keajaiban OLXTOTO, jangan ragu untuk mendaftar dan mulai bermain hari ini!  
    • OLXTOTO adalah bandar slot yang terkenal dan terpercaya di Indonesia. Mereka menawarkan berbagai jenis permainan slot yang menarik dan menghibur. Dengan tampilan yang menarik dan grafis yang berkualitas tinggi, pemain akan merasa seperti berada di kasino sungguhan. OLXTOTO juga menyediakan layanan pelanggan yang ramah dan responsif, siap membantu pemain dengan segala pertanyaan atau masalah yang mereka hadapi. Daftar =  https://surkale.me/Olxtotodotcom1
    • DAFTAR & LOGIN BIGO4D   Bigo4D adalah situs slot online yang populer dan menarik perhatian banyak pemain slot di Indonesia. Dengan berbagai game slot yang unik dan menarik, Bigo4D menjadi tempat yang ideal untuk pemula dan pahlawan slot yang berpengalaman. Dalam artikel ini, kami akan membahas tentang Bigo4D sebagai situs slot terbesar dan menarik yang saat ini banyak dijajaki oleh pemain slot online.
  • Topics

×
×
  • Create New...

Important Information

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