Started by
InfernoEverflame
on
Topic category: Help with Minecraft modding (Java Edition)
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
are you willing to code?
sure
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.
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!
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
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
which version mc are you modding?
2020.5 Mcreator, 1.15.2 Minecraft
create a new procedure. at the top of the procedure select global trigger "Entity joins world", like this:
in the custom code snippet, enter the following:
where YourModEntity is the name of your custom mob.
this should make all mob entities that can attack go attack your custom mob.
Seems nice! But how about only zombies for example?
Just change the name of the entity in the if statement.
Where exactly?
You don't need to touch the code. I'm talking about the actual drag block.
Can you give an example with images?