Jump to content

Recommended Posts

Posted

How would I go about making a projectile ignore the moment when a mob turns red and goes invulnerable after being hit? This way my projectiles could hit them at a more rapid speed and still deal damage.

 

edit: If there is a way to remove the period on my mobs, that would work too.

Posted

I believe it is controlled by the hurtResistantTime field in the Entity class.  The good news is that it is public so you should be able to control it even on vanilla mobs.  It is normally controlled in the attackEntityFrom() method so you might want to check that out to understand how it normally works before messing with it.  At very least on your custom mobs you can @Override that method to get rid of the hurt resistance.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.