Jump to content

(1.16.5) [SOLVED] TopSolidRangeConfig blocks spawning outside parameters


Jurassicash

Recommended Posts

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
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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

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