Jump to content

Recommended Posts

Posted

I'm having issues spawning my flying entity in my custom biome, heres what I have currently:

Inside my biomes json:

  "spawners": {
    "creature": [
      {
        "type": "frv:zephxen",
        "maxCount": 2,
        "minCount": 1,
        "weight": 10
      }
    ]
  },
  "spawn_costs": {},

 

How I'm calling the SpawnPlacementRegisterEvent:
 

    @SubscribeEvent
    public static void entitySpawnRestriction(SpawnPlacementRegisterEvent event)
    {
        event.register(EntitiesSTLCON.ZEPHXEN.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES,
                Zephxen::checkZephxenSpawnRules, SpawnPlacementRegisterEvent.Operation.OR);
    }

 

Finally this is how I registered the entity:

    public static final RegistryObject<EntityType<Zephxen>> ZEPHXEN =
            ENTITY_TYPES.register("zephxen",
                    () -> EntityType.Builder.of(Zephxen::new, MobCategory.CREATURE)
                            .sized(2.3f, 2.3f).canSpawnFarFromPlayer().clientTrackingRange(10)
                            .build(new ResourceLocation(STLCON.MOD_ID, "zephxen").toString()));

 

 

So the problem/bug that I have is that they do spawn when I teleport to that specific biome they're supposed to spawn, but they only spawn in that area that I've teleported, when I explore my biome further they don't spawn, even if I teleport couple thousand blocks and try again in a new biome, still nothing spawns. And also I did play around with weight and min/max spawn count, it is still the same story.

 

I'm honestly not really sure what else am I missing, thank you in advance 🙏

 

Posted

spawning is tricky business and there is now way to tell you instantly. you need to put log calls when your flier spawns and when it despawns (it's quite possibe that they despawn right away for some reason).  print coordinates too of course and teleport there and see.

oh and you're not in peaceful difficulty, of course.

Posted
2 hours ago, MFMods said:

spawning is tricky business and there is now way to tell you instantly. you need to put log calls when your flier spawns and when it despawns (it's quite possibe that they despawn right away for some reason).  print coordinates too of course and teleport there and see.

oh and you're not in peaceful difficulty, of course.

 

I swapped my entity to an animal while maintaining flying etc functionality (so it's no longer FlyingMob), they now spawn properly so that's kind of interesting I found out, still appreciate your help

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.