Editing Vanilla mobs.

Started by InfernoEverflame on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 years ago
Joined Aug 2020
Points:
640

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
Editing Vanilla mobs.

hello To all MCreator developers and Mod creators, i was wondering how you could make a vanilla mob aggressive to a modded mob 

Ex: Zombie hostile to Villagers

Active 3 years ago
Joined Nov 2019
Points:
875

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 384
are you willing to code?
Thu, 09/17/2020 - 03:22

are you willing to code?

Active 4 years ago
Joined Aug 2020
Points:
640

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
sure  
Sat, 09/19/2020 - 08:00

sure

 

Active 3 years ago
Joined Nov 2019
Points:
875

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 384
1. hook the net…
Sat, 09/19/2020 - 15:39

1. hook the net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent

2. if event entity is type mob, get the entity's targetTasks and add new task to target your mob

3. so that your event hook won't hog too much cpu time and won't add the same task infinite times, make a List<Integer> object to track the mob's entity ID you've modified. if that mob is already modified, skip adding the new task.

Active 3 days ago
Joined May 2020
Points:
714

User statistics:

  • Modifications: 5
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 73
Hi, I just looked at your…
Wed, 02/24/2021 - 19:10

Hi, I just looked at your comment ahznb, but some clear examples would really help for ppl who have no understanding on coding.

 

Could you please update it and give some examples? Hopefully you can, thanks!

Active 3 years ago
Joined Nov 2019
Points:
875

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 384
it will be quite difficult…
Fri, 02/26/2021 - 19:48

it will be quite difficult to explain if you can't code.

btw, you need to reply to my comment for me to be notified, otherwise i won't know you asked me a question

Active 3 days ago
Joined May 2020
Points:
714

User statistics:

  • Modifications: 5
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 73
Oh, didn't know about that…
Sat, 03/06/2021 - 15:43

Oh, didn't know about that feature, thanks.

 

Besides that; I might not know how to code, but that doesn't mean I wouldn't want to use any custom coding. I wouldn't mind at all!

When I said that it wasn't clear for people who don't know coding, I meant for people who specifically do not use coding at all and with that do not know where to place those lines. :P

Active 3 years ago
Joined Nov 2019
Points:
875

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 384
which version mc are you…
Sun, 03/07/2021 - 14:23

which version mc are you modding?

Active 3 days ago
Joined May 2020
Points:
714

User statistics:

  • Modifications: 5
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 73
2020.5 Mcreator, 1.15.2…
Mon, 03/08/2021 - 20:03

2020.5 Mcreator, 1.15.2 Minecraft

Active 3 years ago
Joined Nov 2019
Points:
875

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 384
create a new procedure. at…
Tue, 03/09/2021 - 06:55

create a new procedure. at the top of the procedure select global trigger "Entity joins world", like this:

https://cdn.discordapp.com/attachments/599250311852458006/818737157438439464/unknown.png

in the custom code snippet, enter the following:

((MobEntity)entity).targetSelector.addGoal(1, new NearestAttackableTargetGoal((MobEntity)entity, YourModEntity.CustomEntity.class, false, false));

where YourModEntity is the name of your custom mob.

this should make all mob entities that can attack go attack your custom mob.

Active 3 days ago
Joined May 2020
Points:
714

User statistics:

  • Modifications: 5
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 73
Seems nice! But how about…
Thu, 03/18/2021 - 15:38

Seems nice! But how about only zombies for example?

Active 2 years ago
Joined Nov 2018
Points:
977

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 571
Just change the name of the…
Thu, 03/18/2021 - 17:51

Just change the name of the entity in the if statement.

Active 3 days ago
Joined May 2020
Points:
714

User statistics:

  • Modifications: 5
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 73
Where exactly?
Thu, 03/18/2021 - 18:28

Where exactly?

Active 2 years ago
Joined Nov 2018
Points:
977

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 571
You don't need to touch the…
Thu, 03/18/2021 - 18:34

You don't need to touch the code. I'm talking about the actual drag block.

a

Active 3 days ago
Joined May 2020
Points:
714

User statistics:

  • Modifications: 5
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 73
Can you give an example with…
Thu, 03/18/2021 - 19:01

Can you give an example with images?