Jump to content

Recommended Posts

Posted

I am trying to make a mod that revamps pre-existing hostile mobs in minecraft. I want to make zombies spawn in hordes and change some of the base stats, however I can not find any tutorial that really covers this. I can program Java just fine but all the libraries and necessary files confuse me. I am using forge and intelliJ to make this mod. Any help would be appreciated.

Posted
14 hours ago, sandbag11 said:

I want to make zombies spawn in hordes and change some of the base stats, however I can not find any tutorial that really covers this.

This sounds like a datapack imo. To change the weights for zombies, you can apply a biome modifier. As for hanging the base stats, you can apply the values using the EntityJoinLevelEvent event.

Posted

If it is not too much of a bother, can you point me to some resources that better explain those two concepts, biome modifiers and EntityJoinLevelEvent. Thank you for the advice!

 

Posted

@SubscribeEvent

public static void zombieHealth(EntityJoinLevelEvent event)
{
if(event.getEntity() instanceof Zombie zombie)
{
zombie.setHealth(50);
}
}

 

this is the code im trying to use to set the zombies health to 50 from 20. It does not work. I have another event, livinghurtevent, that tells me the mobs health everytime i hit it and it works. I just cant get the zombie health part to work. Also as a test i wanted to add a part in the current event that would send a chat message that a zombie spawned and with what health it had. How would i fix this?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.