How to I customize an existing mob?

Started by PheasantKing15 on

Topic category: Help with Minecraft modding (Java Edition)

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
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.

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

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.

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?

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?

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.

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?