Jump to content

Magical Shield [1.7.10]


Recommended Posts

so in this mod I am making I have decided that I want to add some kind of spell to protect you, for instance, someone throws an instant damage potion at you and you use the spell, when the potion hits the protection shield/spell it repels or kills the entity incoming so the player is not hurt. how should I go about doing this?

Im serious don't look at it!!

Link to comment
Share on other sites

Do you have like, some kind of base for this mod? For the shield you can look at the LivingAttackEvent. It will give you the entity that's been attacked as well as the damage source (magic is harming potions, anvil is an anvil dropping on them etc). As for shielding you can modify the event.ammount by however much you want to decrease the damage

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now


  • Create New...

Important Information

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