How to I customize an existing mob?

Started by PheasantKing15 on

Topic category: Help with modding (Java Edition)

Last seen on 21:39, 11. Sep 2017
Joined Jun 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to I customize an existing mob?
Mon, 08/21/2017 - 19:17 (edited)

I would like to edit polar bear and wolf A.I to be more realistic And I want to change the model size for spiders/sliverfish/endermites/cave spiders

Edited by PheasantKing15 on Mon, 08/21/2017 - 19:17
Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Actually, it does not. Do you
Mon, 08/21/2017 - 19:09

Actually, it does not. Do you want to change its drops? Or AI, model, size, texture, or what? The title says very little to say anything specific.

Last seen on 21:39, 11. Sep 2017
Joined Jun 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Actually, it does not. Do you
Mon, 08/21/2017 - 19:15

I would like to edit it's A.I, I want to make polar bears and wolves need to eat and drink and be able to reproduce on their own

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You have to first make an
Mon, 08/21/2017 - 19:34

You have to first make an Event Handler (I recommend start with "Overlay element" as it already contains one). There you need subscribe for EntityJoinWorldEvent. event. First, check if the entity is an instance of EntityPolarBear or EntityWolf. Next, you can get the tasks field of the entity. Here you can use method addTask() to add a new AI task.
Unfortunately, you have to make one. An AI task must extend EntityAIBase. You can start with EntityAIEatGrass. You can check for example every block in an area of 16 blocks if it is water and if so move the entity to the block, do some "drink effect" and increase its "thirst" variable. For this, you need to use a custom Capability. Capability can seem to be hard to make but in reality, it is quite easy. For the reproduction, you need to use a custom modified version of EntityAIMate so you can check the thirst and hunger.
For model changing RenderingRegistry.registerEntityRenderingHandler() is most likely the way to go.

Last seen on 21:39, 11. Sep 2017
Joined Jun 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:You have to first make an
Mon, 08/21/2017 - 19:44

How to I sub to entityjoinworldevent?

Last seen on 21:39, 11. Sep 2017
Joined Jun 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And how to I go to overlay
Mon, 08/21/2017 - 19:45

And how to I go to overlay element?

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
As I said, create an
Mon, 08/21/2017 - 19:49

As I said, create an EventHandler (best way to do it is creating a random "Overlay" element). It has already event handler in it. There is already even one event subscribed so you can use it as a reference.

Last seen on 21:39, 11. Sep 2017
Joined Jun 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So sorry if I am not getting
Tue, 08/22/2017 - 02:31

So sorry if I am not getting it, could you give me pictures?