Jump to content

Forge 1.20.1 Custom entities not spawning


DinoPawz

Recommended Posts

I cannot get my custom entities to spawn naturally in the world. They spawn successfully from a spawn egg. I have tried a video and did what they said, but still doesn't work.

 

I put this in the entity's class:

 public static boolean canSpawn(EntityType<CarnAchillobator> entityType, ServerLevelAccessor levelAccessor, MobSpawnType mobSpawnType, BlockPos pos, RandomSource randomSource) {
        return Monster.checkMonsterSpawnRules(entityType, levelAccessor, mobSpawnType, pos, randomSource);
    }

 

I this in the main class:

 @SubscribeEvent
        public static void registerSpawnPlacementsEvent(@NotNull SpawnPlacementRegisterEvent event) {
           
            event.register(ModEntities.ACHILLOBATOR.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.WORLD_SURFACE, CarnAchillobator::canSpawn, SpawnPlacementRegisterEvent.Operation.AND);
       

In the modid/biome_modifier directory, spawn_achillobator.json file:

{
  "type": "forge:add_spawns",
  "biomes": [
    "minecraft:jungle",
    "minecraft:sparse_jungle",
    "minecraft:windswept_forest",
    "minecraft:dark_forest",
    "minecraft:old_growth_birch_forest"
  ],
  "spawners": {
    "type": "wilddinos:achillobator",
    "weight": 100,
    "minCount": 1,
    "maxCount": 1
  }
}

 

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.