Update patches that slipped through last

This commit is contained in:
Zach Brown 2018-01-05 01:30:03 -06:00
parent 06818d2dd7
commit 7c27a2af9c
No known key found for this signature in database
GPG Key ID: CC9DA35FC5450B76
2 changed files with 12 additions and 14 deletions

View File

@ -1,17 +1,18 @@
From 7ecd4df4d533f975f1ae131efd9bcba40d069160 Mon Sep 17 00:00:00 2001
From f73aa9ef72915f3d3da7ce8f83e1ca498c1942c7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
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

View File

@ -1,21 +1,21 @@
From e1494a3b11e1ee5bf25e227cb8a7118234101ffd Mon Sep 17 00:00:00 2001
From 1cc39050af4f335e22706ecf30557a95afcb69eb Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
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