Mob Despawning

Started by CloudtailRox on

Topic category: Advanced modding

Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mob Despawning

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!

Joined Aug 2013
Points:

User statistics:

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

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

Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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!

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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!

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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...