Posted July 19, 20187 yr Hey! How to replace the player attack function (#attackTargetWithCurrentItem)? Is it possible to replace a function without hella workarounds breaking the mod compatibility? Is it even possible?) Thanks in advance. Edited July 19, 20187 yr by Evi1Casul
July 19, 20187 yr Author 5 minutes ago, diesieben07 said: Assuming you are talking about EntityPlayer#attackTargetEntityWithCurrentItem. That method fires AttackEntityEvent, which allows to bypass vanilla's code completely by canceling it. Thanks.
July 20, 20187 yr Author By the way, does canceling event on high priority bypass low priority code from other mods? Edited July 20, 20187 yr by Evi1Casul
July 20, 20187 yr if they set receiveCanceled in SubscribeEvent to be true they will relieve the canceled event and can set it to be not canceled high priority will get the event first Edited July 20, 20187 yr by loordgek
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.