Jump to content

Recommended Posts

Posted

I created my own World Generator which add some Custom Plants, Trees and Grass. The problem that occurs is when i add more stuff, it start to Stackoverflow, but only during world creation in my custom biome (custom worldtype) , finding my biome in a normal worldtype dont cause it because not that much chunks will created at same i think. I heard it is because if i try to generate blocks outside of chunks, they will try to generate over and over again until they get placed causing that overflow if it will use that to often. However it is sometimes nessesary for me to generate more than only a chunk of stuff, like clusters of blocks like pumpkins they need to reach over chunks borders otherwise it will looks weird.

 

I had a few thoughts for a solution, one is to ask if the chunk of the block is generated and if it isnt the block will not be generated and added to a pos/block hashmap and will be asked again during the next chunk generation but i think that isnt a good way because on restart it will maybe cause cuts of blocks in the landscape after the map will be unloaded.

 

Does anybody of ou have a solution to fix the stackoverflow Problem? Maybe i am completly wrong with what i think about the problem.

Posted

i found out what causes it but now im feeling dumber than bevore

Quote

for(int i = 0; i < perChunk; i++) {
            int rx = random.nextInt(16);
            int rz = random.nextInt(16);
            int x = chunkX * 16 + rx;
            int z = chunkZ * 16 + rz;
            int y = world.getHeight(new BlockPos(x,0,z)).getY();
            if(world.getBlockState(new BlockPos(x, y-1, z)) == Modblocks.WASTEGRASS_BLOCK.getDefaultState()) {
                world.setBlockState(new BlockPos(x, y, z), block.getDefaultState());
            }
        }

im wondering why, if i turn rz/rx to randomnextint14+1 no cascadeworldgenlag will be triggered and i have stripes in my decoration exactly at chunk boarders, if i do random16 it will only generate in the chunk but still trigger that gen lags :C oof can anybody explain why? i also tested to only populate the chunk at 0,0 i dont see any dekoration reaching over chunk boarders but cascade worldgenlag say other stuff

Posted
3 hours ago, Schleim_time said:

can anybody explain why?

Neighbor block updates. When a block is placed next to an unloaded chunk it tries to give the block in the unloaded chunk an update causing the chunk to load.

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.

Posted
6 hours ago, Animefan8888 said:

Neighbor block updates. When a block is placed next to an unloaded chunk it tries to give the block in the unloaded chunk an update causing the chunk to load.

Hey thank you for responding, i already fixed it but i need an explaination, i readed i have to add 8 to the random for some reason. If do rz/rx=random16+8 no lag be be fired but whyyy? I mean the plus 8 in my thought will surely trigger 3 neigbour chunks with a very high chance

Posted
53 minutes ago, Schleim_time said:

Hey thank you for responding, i already fixed it but i need an explaination, i readed i have to add 8 to the random for some reason. If do rz/rx=random16+8 no lag be be fired but whyyy? I mean the plus 8 in my thought will surely trigger 3 neigbour chunks with a very high chance

Here is an excerpt from on of Jabelar's Tutorials.

Quote

To avoid this, vanilla Minecraft causes all decoration, ore and feature generation to be offset by 8 blocks in the X and Z with the neighboring chunks only then needing to be loaded in those directions. In other words, a single chunk is never generated on its own but rather always at least four. The generation then takes place around the center of where those blocks come together.

 

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.

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

    • UPDATE: this seems to be an Arch-specific issue. Switching to Ubuntu server fixed EVERYTHING.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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