Posted November 22, 20159 yr 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!!
November 22, 20159 yr 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
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.