Mob Despawning

Started by CloudtailRox on Wed, 09/14/2016 - 21:32

Topic category: Advanced modding

Last seen on 23:50, 22. Apr 2019
Joined Nov 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Mob Despawning
Wed, 09/14/2016 - 21:32

Hi. I came up with a way for "tameable" mobs in Mcreator. Problem is, I don't know how to make it work. I'd like to make a mob that will attack you, but if you feed it some meat, it will despawn and be replaced with another mob thats exactly the same except peaceful and rideable. I just don't know how to make mobs despawn. I'm assuming it would go in the "Custom Code" section for the events. Could someone show me what the code would be? (By the way I know almost nothing about coding to where and how to put the code in would also be appreciated.) Thanks. Bye!

Last seen on 23:50, 22. Apr 2019
Joined Nov 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
anyone help?
Thu, 09/15/2016 - 21:01

anyone help?

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
 if (!this.worldObj.isRemote)
Thu, 09/15/2016 - 22:10

 if (!this.worldObj.isRemote)
        {
                 this.setDead();
        }

Last seen on 23:50, 22. Apr 2019
Joined Nov 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Omg thank you so much! I am
Fri, 09/16/2016 - 00:56

Omg thank you so much! I am finally able to make tamable mobs!

Last seen on 13:22, 25. Jul 2019
Joined Jul 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I'm lost, what exactly did…
Fri, 07/19/2019 - 02:49

I'm lost, what exactly did you do? I want to do the opposite, a mob that can't take damage directly but when damaged replaces mob with a hostile one that looks similar. If anyone knows how pls help- Thnx!

Last seen on 13:22, 25. Jul 2019
Joined Jul 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Also making only a certain…
Fri, 07/19/2019 - 02:50

Also making only a certain item or the mob they turn into able to hurt them would be cool as well...