From 7c27a2af9c4db72d0a2f5d65db037c5e639bb544 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 5 Jan 2018 01:30:03 -0600 Subject: [PATCH] Update patches that slipped through last --- ...gHook-reference-on-Craft-Entity-removal.patch | 16 +++++++--------- .../0234-LivingEntity-setKiller.patch | 10 +++++----- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Spigot-Server-Patches/0157-Remove-FishingHook-reference-on-Craft-Entity-removal.patch b/Spigot-Server-Patches/0157-Remove-FishingHook-reference-on-Craft-Entity-removal.patch index 9c46893372..a2ba9317a7 100644 --- a/Spigot-Server-Patches/0157-Remove-FishingHook-reference-on-Craft-Entity-removal.patch +++ b/Spigot-Server-Patches/0157-Remove-FishingHook-reference-on-Craft-Entity-removal.patch @@ -1,17 +1,18 @@ -From 7ecd4df4d533f975f1ae131efd9bcba40d069160 Mon Sep 17 00:00:00 2001 +From f73aa9ef72915f3d3da7ce8f83e1ca498c1942c7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 16 Jun 2016 00:17:23 -0400 Subject: [PATCH] Remove FishingHook reference on Craft Entity removal diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java -index ecfc316b..3f909c17 100644 +index d555597dc..f5419dea4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java -@@ -64,6 +64,16 @@ public class CraftFish extends AbstractProjectile implements Fish { +@@ -62,4 +62,14 @@ public class CraftFish extends AbstractProjectile implements Fish { + Validate.isTrue(chance >= 0 && chance <= 1, "The bite chance must be between 0 and 1."); this.biteChance = chance; } - ++ + // Paper start + @Override + public void remove() { @@ -21,10 +22,7 @@ index ecfc316b..3f909c17 100644 + } + } + // Paper end -+ - @Deprecated - public LivingEntity _INVALID_getShooter() { - return (LivingEntity) getShooter(); + } -- -2.13.1.windows.2 +2.15.1.windows.2 diff --git a/Spigot-Server-Patches/0234-LivingEntity-setKiller.patch b/Spigot-Server-Patches/0234-LivingEntity-setKiller.patch index ec6df3f57c..3b676e4aa9 100644 --- a/Spigot-Server-Patches/0234-LivingEntity-setKiller.patch +++ b/Spigot-Server-Patches/0234-LivingEntity-setKiller.patch @@ -1,21 +1,21 @@ -From e1494a3b11e1ee5bf25e227cb8a7118234101ffd Mon Sep 17 00:00:00 2001 +From 1cc39050af4f335e22706ecf30557a95afcb69eb Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 31 Jul 2017 01:49:48 -0500 Subject: [PATCH] LivingEntity#setKiller diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 1eafdecb4..f81622a34 100644 +index b9e106031..413bab0c9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -256,6 +256,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -252,6 +252,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { return getHandle().killer == null ? null : (Player) getHandle().killer.getBukkitEntity(); } + // Paper start + @Override + public void setKiller(Player killer) { -+ EntityPlayer entityPlayer = killer == null ? null : ((CraftPlayer) killer).getHandle(); ++ net.minecraft.server.EntityPlayer entityPlayer = killer == null ? null : ((CraftPlayer) killer).getHandle(); + getHandle().killer = entityPlayer; + getHandle().lastDamager = entityPlayer; + getHandle().lastDamageByPlayerTime = entityPlayer == null ? 0 : 100; // 100 value taken from EntityLiving#damageEntity @@ -26,5 +26,5 @@ index 1eafdecb4..f81622a34 100644 return addPotionEffect(effect, false); } -- -2.14.2 +2.15.1.windows.2