Jump to content

How to make an entity invlunerable and unable to be pushed?


MrabEzreb

Recommended Posts

I am currently making a mod wherein I need an entity that A: should not be able to be damaged and B: should not be able to move.

How can I do this? I can't find anything along the lines of get/set Invulnerable and canBePushed and canBeCollided with arent working!

Thanks in advance

Link to comment
Share on other sites

I am using forge 1.8 11.14.3.1450, since when I tried following the instructions to update forge on the latest it didnt work (I assume because of the new Mdk thingamadoodle)

I updated that from the latest 1.7.10, since I was originally following pahimar's LMR series, but then switched to another tutorial that is for 1.8

Link to comment
Share on other sites

I believe that I may have found it, desguised as func_180431_b(DamageSource p_180431_1_). Is this what should be inside of it (in the Entity class)

public boolean func_180431_b(DamageSource p_180431_1_)
    {
        return this.invulnerable && p_180431_1_ != DamageSource.outOfWorld && !p_180431_1_.func_180136_u();
    }

Link to comment
Share on other sites

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.