Jump to content

Recommended Posts

Posted (edited)

I'm trying to port a dimension mod to 1.15.2;

 

I have only this one issue: mobs spawned with EntityClassification.MONSTER spawn like they should (at night or in caves), but mobs with EntityClassification.CREATURE do not spawn at all (and yes, I register the spawn with EntitySpawnPlacementRegistry) here is the function i use (code is in Kotlin, very similar to Java)

 

EntitySpawnPlacementRegistry.register(MY_ENTITY_TYPE, PlacementType.ON_GROUND, Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, EntitySpawnPlacementRegistry.IPlacementPredicate({
	world, _, pos, _ -> world.getBlockState(pos.down()).run {this == Glacia.Blocks.GLACIAL_DIRT.stateSnowy || block == Blocks.GRASS_BLOCK} && world.getLightSubtracted(pos, 0) > 8;
}))

^ snippet from Glacia_Entity.kt

I call the `registerProperties()` function from my FMLCommonSetupEvent call and register the entities on my RegistryEvents class (the process might be a bit unusual, but it works, and i can spawn them with commands)

 

Here is how I add the spawns in my Biome constructor

 

this.addSpawn(EntityClassification.MONSTER, SpawnListEntry(EntityType.SLIME, 50, 4, 4))
this.addSpawn(EntityClassification.CREATURE, SpawnListEntry(Glacia.Entity.GLACIAL_TURTLE, 40, 4, 4))
this.addSpawn(EntityClassification.CREATURE, SpawnListEntry(Glacia.Entity.SABER_TOOTHED_CAT, 30, 4, 4))
this.addSpawn(EntityClassification.CREATURE, SpawnListEntry(Glacia.Entity.REINDEER, 25, 5, 8))
this.addSpawn(EntityClassification.CREATURE, SpawnListEntry(Glacia.Entity.PENGUIN, 20, 5, 8))
this.addSpawn(EntityClassification.MONSTER, SpawnListEntry(Glacia.Entity.GLACIAL_SEEKER, 100, 5, 8))

^ snippet from BiomeGlaciaPlains.kt

 

As I previously said, GLACIAL_SEEKER spawns correctly while the other custom mobs do not; am I missing something?

 

EDIT: if that can help, my biome uses a custom block as "grass", which I already added to the spawn conditions

Edited by Alex Sim

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.