Jump to content

Recommended Posts

Posted

Hello modding Forge friends -

 

I've been experimenting with BiomeDictionary recently, for WorldGen as well as for Entity Spawns. Today, doing some local testing on Inventory Pets, and noticed that when I started using BiomeDictionary for WorldGen I started seeing client chunk ticking.

 

There's nothing special in my implementation.

 

AFTER 

	Biome biomegenbase = world.getBiome(new BlockPos(Xcoord, 60, Zcoord)); 
	if(BiomeDictionary.hasType(biomegenbase, Type.FOREST)) {
		int Ycoord = 60 + random.nextInt(60);
		new WorldGenTreeTop(false).generate(world, random, new BlockPos(Xcoord, Ycoord, Zcoord));
	}

 

BEFORE (no ticking)

	Biome biomegenbase = world.getBiome(new BlockPos(Xcoord, 60, Zcoord)); 
	if(biomegenbase.getBiomeName().equals("Forest")) {
		int Ycoord = 60 + random.nextInt(60);
		new WorldGenTreeTop(false).generate(world, random, new BlockPos(Xcoord, Ycoord, Zcoord));
	} 

 

But this seemed to cause more frequent chunk loading infos in the Console.

 

Question: Does BiomeDictionary come with the same caveats as OreDictionary? In other words, use it sparingly and don't use it in tick loops? 

 

 

Posted

Well first off, you need to be careful what chunks your generator is loading. Read this for some info: 

 

https://www.reddit.com/r/feedthebeast/comments/5x0twz/investigating_extreme_worldgen_lag/

 

The reason you're getting more chunk loading, specifically for the BiomeDict stuff is that you're now generating in MORE then just EXACTLY Forest. You're generating in anything thats CONSIDERED a Forest, which in vanilla is 21 of the 61 known biomes.

Just as a note your 'BEFORE" would be better written {and have the same effect} as: if (biomegenbase == Biomes.FOREST)

  • Like 1

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Thanks, Lex. Yes, I saw that post on reddit and used it to change my world gen. Good stuff.

 

Your analysis is correct. I did some more testing and there are more opportunities for custom worldgen to occur, which is causing additional client time, as you suggest.

 

Thanks for the tip. Yeah, I was using "contains" for others in the list... lazy coder's biome dictionary. Working fine now.

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.