How to make an entity unkillable?

How to make an entity unkillable? - Content female customer with long curly hair wearing casual outfit sitting at wooden table with netbook in classic interior restaurant while making online order

I want to protect my custom entity but everyone can kill it. I tried to loop setting health to max, I tried to protect it with events but it could still die.

How to protect it? Or is there any built-in-minecraft method which makes the entity unkillable?​






Pictures about "How to make an entity unkillable?"

How to make an entity unkillable? - Unrecognizable crop African American female pouring essential oil in glass bottle while making liquid incense at table
How to make an entity unkillable? - Concentrated redhead female wearing light apron kneading clay in baking pan while creating in modern apartment
How to make an entity unkillable? - Creative female artisan drawing in workshop



How do you make an entity unkillable in Minecraft?

If you need to do something extremely dangerous but don't want to die then just do /invincible command for let's say 100 minutes so you type in the command and boom your invincible for 100 minutes .






Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Yan Krukov, Anna Shvets, Monstera, Andrea Piacquadio