Jump to content

[SOLVED]Biome Generation


Blue_Atlas

Recommended Posts

18 minutes ago, Blue_Atlas said:

I have made a biome but it generates more often then I like. I want it to generate rarely, like the mesa biome

Then change the rarity. Cant help if you dont post code.

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.

Link to comment
Share on other sites

Biome Init:

public class ModBiomeInit 
{
	public static final Biome ENDOVERRIDE = new BiomeEndOverride();
	
	public static void registerBiomes()
	{
		initBiome(ENDOVERRIDE, "Ender Mutated Biome", BiomeType.COOL, Type.END);
	}
	
	private static Biome initBiome(Biome biome, String name, BiomeType biomeType, Type... types)
	{
		biome.setRegistryName(name);
		ForgeRegistries.BIOMES.register(biome);
		BiomeDictionary.addTypes(biome, types);
		BiomeManager.addBiome(biomeType, new BiomeEntry(biome, 10));
		BiomeManager.addSpawnBiome(biome);
		return biome;
	}
}

 

Biome class:

public class BiomeEndOverride extends Biome
{
	public BiomeEndOverride() 
	{
		super(new BiomeProperties("EndOverride").setRainDisabled());
		
		topBlock = Blocks.END_STONE.getDefaultState();
		fillerBlock = ModBlocksInit.END_FRAGMENT_ORE.getDefaultState();
		
		this.spawnableMonsterList.clear();
		this.spawnableCreatureList.clear();
		
		this.spawnableMonsterList.add(new SpawnListEntry(EntityWalkingShulker.class, 15, 2, 7));
		this.spawnableMonsterList.add(new SpawnListEntry(EntityEnderman.class, 25, 3, 9));
	}
}

 

Register Biome Init:

public static void preInitRegistries()
	{
		ModBiomeInit.registerBiomes();
	}

 

Where is the rarity?

Link to comment
Share on other sites

Just now, Blue_Atlas said:

Where is the rarity?

 

1 minute ago, Blue_Atlas said:

new BiomeEntry(biome, 10)

Change the number 10

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.

Link to comment
Share on other sites

2 minutes ago, Blue_Atlas said:

ok but do i raise of lower it?

Look at the java doc above the class. But I believe you lower it.

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.

Link to comment
Share on other sites

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.