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.

(1.16.5) [SOLVED] TopSolidRangeConfig blocks spawning outside parameters

Featured Replies

Posted

Hey there, I set up my ore generation file and the first ore I've made seems to be spawning a bit above the maximum height I set. I've been thinking in terms of the world coordinates when setting these numbers, with bedrock as 0 and everything else going up from there. 

public class OreGeneration {
	
	//the actual individual ores
	public static void generateOres(final BiomeLoadingEvent event) {
		if(!(event.getCategory().equals(Biome.Category.NETHER) || event.getCategory().equals(Biome.Category.THEEND))) {
			generateOre(event.getGeneration(), OreFeatureConfig.FillerBlockType.NATURAL_STONE, BlockInit.EGG_ORE.get().defaultBlockState(), 4, 15, 31, 15);

		}
	}
	
	//can be called at any time to make an ore
	private static void generateOre(BiomeGenerationSettingsBuilder settings, RuleTest fillerType, BlockState state, int veinSize,
			int minHeight, int maxHeight, int maxPerChunk) {
	settings.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, 
			Feature.ORE.configured(new OreFeatureConfig(fillerType, state, veinSize))
			.decorated(Placement.RANGE.configured(new TopSolidRangeConfig(minHeight, 0, maxHeight)))
			.squared().count(maxPerChunk));
	}

}

here's a picture of the ore, about 10 blocks above the number I set. https://imgur.com/a/8jflRKz

Is minecraft using a different set of numbers than the world coordinates? Or is the range just looser than I'm expecting it to be. Thank yall for help with this. 

Edited by Jurassicash

  • Author
5 hours ago, diesieben07 said:

The position given by the placement is only the starting position of the ore gen. The ore gen then generates in a patch around that position, so can end up higher (depending on your vein size).

Alright! Thank you for the answer, I was just curious how it worked. 

  • Jurassicash changed the title to (1.16.5) [SOLVED] TopSolidRangeConfig blocks spawning outside parameters

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.