How to I customize an existing mob?

Started by PheasantKing15 on

Topic category: Help with Minecraft modding (Java Edition)

Active 8 years ago
Joined Jun 2017
Points:
711

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 8
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
Active 1 year ago
Joined Aug 2013
Points:
1164

User statistics:

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

Active 8 years ago
Joined Jun 2017
Points:
711

User statistics:

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

Active 1 year ago
Joined Aug 2013
Points:
1164

User statistics:

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

Active 8 years ago
Joined Jun 2017
Points:
711

User statistics:

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

How to I sub to entityjoinworldevent?

Active 8 years ago
Joined Jun 2017
Points:
711

User statistics:

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

And how to I go to overlay element?

Active 1 year ago
Joined Aug 2013
Points:
1164

User statistics:

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

Active 8 years ago
Joined Jun 2017
Points:
711

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 8
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?