-
-
Save gabizou/8ad867a0301f58a8a55e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Listener | |
| public void onDamage(DamageEntityEvent entityEvent) { | |
| this.logger.info("======== DamageEvent START ========"); | |
| this.logger.info("Cause: " + entityEvent.getCause().toString()); | |
| this.logger.info(" ---------------------------------"); | |
| this.logger.info("Base Damage:" + entityEvent.getBaseDamage()); | |
| this.logger.info("Modifiers:"); | |
| List<Tuple<DamageModifier, Function<? super Double, Double>>> originalmodifiers = entityEvent.getModifiers(); | |
| for (int i = 0; i < originalmodifiers.size(); i++) { | |
| this.logger.info("Modifier " + i + ": " + originalmodifiers.get(i).getFirst().toString()); | |
| this.logger.info("Damage Reduction: " + entityEvent.getDamage(originalmodifiers.get(i).getFirst())); | |
| } | |
| this.logger.info("Final Damage: " + entityEvent.getFinalDamage()); | |
| this.logger.info("======= DamageEvent Finish ========"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment