Jump to content

Recommended Posts

Posted (edited)

Hi, I'm making a custom Entity, already fix it all, i can spawn it by commands but idk how to create spawnegg, i'm working with deferred register and I want that mob spawns naturally in biomes, but i don't see any way to add my monster to biomemaker class etc, any tip? thank u btw.

1. I'm using tthis to try to spawn it (I know 500 it's too much), problem is: Pigs are spawning, not my mob... But on dungeons it's spawning okay.

2. Maybe a more "natural" codding way to spawn it naturally?

3. Really thanks for ur patience, I post a lot, sorry.

  private void setup(final FMLCommonSetupEvent event) {
        // some preinit code
        LOGGER.info("HELLO FROM PREINIT");

        EntitySpawnPlacementRegistry.register(VERRUCT.get(), EntitySpawnPlacementRegistry.PlacementType.ON_GROUND, Heightmap.Type.MOTION_BLOCKING_NO_LEAVES,
                MonsterEntity::checkMonsterSpawnRules);
        DungeonHooks.addDungeonMob(VERRUCT.get(), 500);
    @SubscribeEvent
    public static void onBiomeLoad(final BiomeLoadingEvent event){
        if (event.getName() == null){
            return;
        }

          MobSpawnInfoBuilder spawns = event.getSpawns();

            if (event.getCategory()!=(Biome.Category.OCEAN)) {
                spawns.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(VERRUCT.get(), 500, 1, 1));
            }

    }
Edited by TonyOneG112
Solved, close thread
Posted

[18:32:34] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Configuration file .\saves\New World (2)\serverconfig\forge-server.toml is not correct. Correcting
[18:32:34] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key server was corrected from null to its default, SimpleCommentedConfig:{

 

Using that code and before I get that. And my mob still don't work.

Posted

bump, now server is creating pigs instead mob, any idea?

 

    @SubscribeEvent
    public static void onBiomeLoad(final BiomeLoadingEvent event){
        if (event.getName() == null){
            return;
        }


            if ((event.getCategory().getName()!=Biome.Category.NETHER.getName()) && (event.getCategory().getName()!=Biome.Category.THEEND.getName())) {
                event.getSpawns().addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(VERRUCT.get(), 200, 5, 5)).addMobCharge(VERRUCT.get(), 0.1D, 0.1D);
            LOGGER.info("Welcome to generation!  "+event.getName());
            }

    }

 

Posted
8 minutes ago, TonyOneG112 said:

bump, now server is creating pigs instead mob, any idea?

 

Check your entity renderer. Did you make a custom model? Did you properly place your textures in the resources?

  • Thanks 1
Posted
1 hour ago, TonyOneG112 said:

bump, now server is creating pigs instead mob, any idea?

show your Entity class, did you create a custom EntityType? did you use EntityType.Pig in your Entity constructor?

  • Thanks 1
  • TonyOneG112 changed the title to [SOLVED][1.16.5] Entity naturally spawn!

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.