From e56a53a008c2499c54c834b6939e49c8b090daa9 Mon Sep 17 00:00:00 2001 From: StrangeOne101 Date: Thu, 29 Sep 2016 14:05:48 +1300 Subject: [PATCH] More 1.9/1.10 fixes (#585) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Fixed Earth/PlantArmor potion effects blinking • Fixed FallingDust particle having the wrong properties • Fixed combos recording 2 right clicks when right clicking with nothing in your hand (fixes FireWheel combo issue) --- src/com/projectkorra/projectkorra/PKListener.java | 11 +++++++---- .../projectkorra/util/ParticleEffect.java | 2 +- .../projectkorra/util/PassiveHandler.java | 8 ++++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/com/projectkorra/projectkorra/PKListener.java b/src/com/projectkorra/projectkorra/PKListener.java index 3028d3b0..1a180d3d 100644 --- a/src/com/projectkorra/projectkorra/PKListener.java +++ b/src/com/projectkorra/projectkorra/PKListener.java @@ -62,6 +62,7 @@ import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerToggleFlightEvent; import org.bukkit.event.player.PlayerToggleSneakEvent; +import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.util.Vector; @@ -1014,10 +1015,12 @@ public class PKListener implements Listener { } }.runTaskLater(plugin, 5); - if (event.getClickedBlock() != null) { - ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK_BLOCK); - } else { - ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK); + if (event.getHand() == EquipmentSlot.HAND) { + if (event.getClickedBlock() != null) { + ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK_BLOCK); + } else { + ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK); + } } if (bPlayer.getBoundAbilityName().equalsIgnoreCase("EarthSmash")) { diff --git a/src/com/projectkorra/projectkorra/util/ParticleEffect.java b/src/com/projectkorra/projectkorra/util/ParticleEffect.java index 83817db7..b1b89833 100644 --- a/src/com/projectkorra/projectkorra/util/ParticleEffect.java +++ b/src/com/projectkorra/projectkorra/util/ParticleEffect.java @@ -446,7 +446,7 @@ public enum ParticleEffect { *
  • Has a downwards motion by default * */ - FALLING_DUST("fallingDust", 46, 10); + FALLING_DUST("fallingDust", 46, 10, true); private static final Map NAME_MAP = new HashMap(); private static final Map ID_MAP = new HashMap(); diff --git a/src/com/projectkorra/projectkorra/util/PassiveHandler.java b/src/com/projectkorra/projectkorra/util/PassiveHandler.java index 1bd96156..de882201 100644 --- a/src/com/projectkorra/projectkorra/util/PassiveHandler.java +++ b/src/com/projectkorra/projectkorra/util/PassiveHandler.java @@ -58,14 +58,14 @@ public class PassiveHandler implements Runnable { EarthArmor abil = CoreAbility.getAbility(player, EarthArmor.class); if (abil.isFormed()) { int strength = abil.getStrength(); - player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 3, strength - 1), false); + player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 20, strength - 1), false); } } if (CoreAbility.hasAbility(player, PlantArmor.class)) { PlantArmor abil = CoreAbility.getAbility(player, PlantArmor.class); if (abil.isFormed()) { int strength = abil.getResistance(); - player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 3, strength - 1), false); + player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 20, strength - 1), false); } } } @@ -151,7 +151,7 @@ public class PassiveHandler implements Runnable { } } if (b) { - player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 3, max-1, true, false), false); + player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 15, max-1, true, false), false); } } @@ -192,7 +192,7 @@ public class PassiveHandler implements Runnable { } } if (b) { - player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 3, max-1, true, false), false); + player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 15, max-1, true, false), false); } }