Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • How do you make custom entities breed?
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
PandaTobi

How do you make custom entities breed?

By PandaTobi, December 4, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

PandaTobi    0

PandaTobi

PandaTobi    0

  • Tree Puncher
  • PandaTobi
  • Members
  • 0
  • 9 posts
Posted December 4, 2020

I have added the temptation items and created a createChild function successfully, but I still do not know how to implement the breeding functionality within my animal entity class. Are there any resources that you can point me to? Much appreciated!

  • Quote

Share this post


Link to post
Share on other sites

PandaTobi    0

PandaTobi

PandaTobi    0

  • Tree Puncher
  • PandaTobi
  • Members
  • 0
  • 9 posts
Posted December 4, 2020

I have also added a BreedGoal, but this also does not allow my mob to breed.

  • Quote

Share this post


Link to post
Share on other sites

PandaTobi    0

PandaTobi

PandaTobi    0

  • Tree Puncher
  • PandaTobi
  • Members
  • 0
  • 9 posts
Posted December 4, 2020

Gosh, I need to look at existing mob files more!

 

Here's the function you need to add if you wish for your mobs to breed:

public boolean isBreedingItem(ItemStack stack) {
    return TEMPTATION_ITEMS.test(stack);
}

Make sure that your TEMPTATION_ITEMS variable exists, and that it is an Ingredient object. 

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • poopoodice
      [1.16.4] How i can open a container by clicking on my mob

      By poopoodice · Posted 9 minutes ago

      No, it is looking for a container provider, so just pass an instance of it.
    • poopoodice
      [1.15.2] Render as 2D icon in GUI, 3D model in hand

      By poopoodice · Posted 10 minutes ago

      You can replace with your own model through ModelBakeEvent.
    • DaemonUmbra
      1.16.4 (Heavily decent modded with around 150ish mods) Crash with exit code -1 most of the time and sometimes exit code 0.

      By DaemonUmbra · Posted 14 minutes ago

      Use a paste site to upload the whole thing. (list in my signature)
    • Klarks
      [1.16.4] How i can open a container by clicking on my mob

      By Klarks · Posted 25 minutes ago

      I ve seen an example of it but i dont understand how i can apply this to my problem. Do I need to call createmenu from new class in networkhooks.opengui method? 
    • BobbyLikesCake
      1.16.4 (Heavily decent modded with around 150ish mods) Crash with exit code -1 most of the time and sometimes exit code 0.

      By BobbyLikesCake · Posted 29 minutes ago

      Sorry, Let me get the full one. Also, it is quite big... Which part do you need exactly since I cant upload all of it (Too big to upload)
  • Topics

    • Klarks
      19
      [1.16.4] How i can open a container by clicking on my mob

      By Klarks
      Started Yesterday at 09:56 PM

    • Woodside
      6
      [1.15.2] Render as 2D icon in GUI, 3D model in hand

      By Woodside
      Started 2 hours ago

    • BobbyLikesCake
      5
      1.16.4 (Heavily decent modded with around 150ish mods) Crash with exit code -1 most of the time and sometimes exit code 0.

      By BobbyLikesCake
      Started 3 hours ago

    • X4Ghost
      1
      Unable to install

      By X4Ghost
      Started 47 minutes ago

    • clermont.holiday
      1
      1.16.3 forge crashing

      By clermont.holiday
      Started 4 hours ago

  • Who's Online (See full list)

    • GamingTiger101
    • Azaka7
    • Woodside
    • X4Ghost
    • CosmosBench244
    • Mango106
    • TheidenHD
    • BobbyLikesCake
    • DaemonUmbra
    • jbredwards
    • Carzival
    • MetalMetagross
    • The_Raven
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • How do you make custom entities breed?
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community