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

 

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.

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

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.