Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

BiomeDictionary causing client chunk ticking...?


Purplicious_Cow
 Share

Recommended Posts

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? 

 

 

Link to comment
Share on other sites

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.
Patreon: http://www.patreon.com/lexmanos
Paypal: http://paypal.me/LexManos

BitCoin: 1Q8rWvUNMM2T1ZfDaFeeYQyVXtYoeT6tTn

Link to comment
Share on other sites

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.

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
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.