Jump to content

[Solved] [1.10.2] Custom ore generation spawning in columns


Recommended Posts

Posted (edited)

Hey everyone, when I set up my ore generation system to spawn per chunk, it seems like several of my generators all decide to start their spawning at the same x and z value, causing what looks like a column of ore. 

Source for individual cluster generation: https://github.com/16ColorGames/SuperTechTweaks/blob/master/src/main/java/com/sixteencolorgames/supertechtweaks/world/WorldGeneratorCluster.java

Source for super: https://github.com/16ColorGames/SuperTechTweaks/blob/master/src/main/java/com/sixteencolorgames/supertechtweaks/world/WorldGeneratorBase.java

Screenshot example: http://prntscr.com/ewltbl

This only seems to happen for clusters that only generate once per chunk or once every few chunks; clusters that generate multiple times per chunk seem to work just fine.

 

For more background, I started this mod before COFH was up for 1.10.2, and I decided to make a few changes at the same time. I have a custom ore block that can contain up to 7 different kinds of ores in one, and breaking the block drops ore chunks for each of the contained ores. This functionality is working just fine.

Edited by oa10712
Posted

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted (edited)

Most of that was clean at one point, that was my attempt to fix it, the code gets much cleaner when i distribute test jars to people on my server to help find bugs. I will push a cleaner commit. The y value is handled within each of the generators to help in cases where multiple clusters are generated per chunk.

Edited by oa10712
Posted (edited)

To anyone having similar issues, the Random passed in the generate method of classes implementing IWorldGenerator is chunk dependent, so all generation per chunk essentially "resets" the seed.

Edited by oa10712
Posted
19 hours ago, oa10712 said:

several of my generators all decide to start their spawning at the same x and z value

Sounds like your randomizing seed is always the same. Set a breakpoint to see what it is in each instance, then take steps to change it up.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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.