Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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? 

 

 

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)

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

  • Author

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.