Posted June 8, 201510 yr I'm trying to use events to affect an entity's attacker based on a certain item's NBT data, but none of the LivingEvents seem to allow this. Am I blind to some feature in the LivingEvents, or is there another way to do this?
June 8, 201510 yr There is a LivingAttackEvent and a LivingHurtEvent, which both could probably be used depending on what you're interested in achieving. In my tutorial on events, I have tried to include a list of all the events I have found in the code. See: http://jabelarminecraft.blogspot.com/p/minecraft-forge-172-event-handling.html Check out my tutorials here: http://jabelarminecraft.blogspot.com/
June 8, 201510 yr Author Can those affect the entity trying to damage the recipient? It seems like LivingAttackEvent and LivingHurtEvent can only affect the recipient. (correct me if I'm wrong)
June 8, 201510 yr The parameter that is passed in to an event often has additional fields that can be accessed. Look at the class for the events, and you'll see that it is possible to get the damage source which may be an entity. 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.