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

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

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.

  • Author

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

  • Author

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

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

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.