Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

(SOLVED) [1.14.4] Modify Vanilla Mob Spawning


Recommended Posts

for (Biome biome : ForgeRegistries.BIOMES) {
  
  biome.getSpawns(EntityClassification.CREATURE).clear();
  biome.getSpawns(EntityClassification.CREATURE).add(new Biome.SpawnListEntry(EntityType.PIG, 1, 3, 5)); 
}

 

I can clear all existing spawns from a biome using the clear method, which allows me to add a spawn exactly how I want, but then everything is gone. There are remove methods but they don't seem to be able to remove specific entities. Anyone know how to do this?

Edited by MineModder2000
Link to post
Share on other sites
  • 3 weeks later...
On 1/30/2020 at 1:32 AM, MineModder2000 said:

I'm old school, but I guess I can learn new tricks ?

 

PS : I just learned how to do it. 

I'm very new to modding and I can't seem to figure out how to do it... :(

Maybe I'm being really stupid, but how did you do it?

Edited by Xrated_junior
Link to post
Share on other sites
13 hours ago, MineModder2000 said:
Iterator<SpawnListEntry> biomeSpawns = biome.getSpawns(EntityClassification.CREATURE).iterator();
    			
while(biomeSpawns.hasNext()) {
	SpawnListEntry entry = biomeSpawns.next();
	if (entry.entityType == EntityType.PIG)
	{
		biomeSpawns.remove();
	}
}

 

Thank you! I will definitely look at that.  I did get it to work eventually. Don't know if it looks bad though... :) 

Link to post
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.

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



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.