Purplicious_Cow Posted May 6, 2017 Posted May 6, 2017 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? Quote
LexManos Posted May 6, 2017 Posted May 6, 2017 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) 1 Quote I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
Purplicious_Cow Posted May 8, 2017 Author Posted May 8, 2017 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. Quote
Recommended Posts
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.