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.

Featured Replies

Posted

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

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.