From 9472d38f3c05a9f833cac72368cf49eb419200a1 Mon Sep 17 00:00:00 2001 From: Pedro <3602279+Doc94@users.noreply.github.com> Date: Thu, 21 Oct 2021 11:11:19 -0300 Subject: [PATCH] Fix method name for Critical damage (#6813) --- patches/server/0832-Add-critical-damage-API.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/patches/server/0832-Add-critical-damage-API.patch b/patches/server/0832-Add-critical-damage-API.patch index 3e5730d1e8..1fb38728d5 100644 --- a/patches/server/0832-Add-critical-damage-API.patch +++ b/patches/server/0832-Add-critical-damage-API.patch @@ -14,7 +14,7 @@ index 80d19af2ad423bd3de0e039c5bb8f97af536aaa9..57bf7dba266b4df7b36bab2d58a609a1 // CraftBukkit end + // Paper start - add critical damage API + private boolean critical; -+ public boolean isCritcal() { ++ public boolean isCritical() { + return this.critical; + } + public DamageSource critical() { @@ -113,7 +113,7 @@ index 2b2654ec04e8abca9db09d6257edf11099bb0d9b..771a00ae7f467660b0c39ffeee05281e damageCause = DamageCause.ENTITY_EXPLOSION; } - event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), entity.getBukkitEntity(), damageCause, modifiers, modifierFunctions); -+ event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), entity.getBukkitEntity(), damageCause, modifiers, modifierFunctions, source.isCritcal()); // Paper - add critical damage API ++ event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), entity.getBukkitEntity(), damageCause, modifiers, modifierFunctions, source.isCritical()); // Paper - add critical damage API } event.setCancelled(cancelled); @@ -122,7 +122,7 @@ index 2b2654ec04e8abca9db09d6257edf11099bb0d9b..771a00ae7f467660b0c39ffeee05281e } - return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, modifiers, modifierFunctions, cancelled); -+ return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, modifiers, modifierFunctions, cancelled, source.isCritcal()); // Paper - add critical damage API ++ return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, modifiers, modifierFunctions, cancelled, source.isCritical()); // Paper - add critical damage API } else if (source == DamageSource.OUT_OF_WORLD) { EntityDamageEvent event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.VOID, modifiers, modifierFunctions); event.setCancelled(cancelled); @@ -131,7 +131,7 @@ index 2b2654ec04e8abca9db09d6257edf11099bb0d9b..771a00ae7f467660b0c39ffeee05281e throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s", entity, damager.getHandle(), source.msgId)); } - EntityDamageEvent event = new EntityDamageByEntityEvent(damager, entity.getBukkitEntity(), cause, modifiers, modifierFunctions); -+ EntityDamageEvent event = new EntityDamageByEntityEvent(damager, entity.getBukkitEntity(), cause, modifiers, modifierFunctions, source.isCritcal()); // Paper - add critical damage API ++ EntityDamageEvent event = new EntityDamageByEntityEvent(damager, entity.getBukkitEntity(), cause, modifiers, modifierFunctions, source.isCritical()); // Paper - add critical damage API event.setCancelled(cancelled); CraftEventFactory.callEvent(event); if (!event.isCancelled()) { @@ -140,7 +140,7 @@ index 2b2654ec04e8abca9db09d6257edf11099bb0d9b..771a00ae7f467660b0c39ffeee05281e if (cause != null) { - return CraftEventFactory.callEntityDamageEvent(null, entity, cause, modifiers, modifierFunctions, cancelled); -+ return CraftEventFactory.callEntityDamageEvent(null, entity, cause, modifiers, modifierFunctions, cancelled, source.isCritcal()); // Paper - add critical damage API ++ return CraftEventFactory.callEntityDamageEvent(null, entity, cause, modifiers, modifierFunctions, cancelled, source.isCritical()); // Paper - add critical damage API } throw new IllegalStateException(String.format("Unhandled damage of %s from %s", entity, source.msgId));