mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-03 01:10:37 +01:00
05466e3b47
Upstream has released updates that appear to apply compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing. Bukkit Changes: d2834556 SPIGOT-4219: Event for PigZombies angering. CraftBukkit Changes:a9c796f1
SPIGOT-4184: Fix furnaces not matching Vanilla smelt or animations195f071e
SPIGOT-4219: Event for PigZombies angering.5e3082c7
SPIGOT-4230: Improve legacy block types
23 lines
919 B
Diff
23 lines
919 B
Diff
From 8d6e94abf1d507f277f931627d3c89cff95577e5 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Wed, 29 Nov 2017 22:18:54 -0500
|
|
Subject: [PATCH] Avoid NPE in PathfinderGoalTempt
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
|
|
index 8ca996e652..1b82479418 100644
|
|
--- a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
|
|
+++ b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
|
|
@@ -52,7 +52,7 @@ public class PathfinderGoalTempt extends PathfinderGoal {
|
|
}
|
|
this.target = (event.getTarget() == null) ? null : ((CraftLivingEntity) event.getTarget()).getHandle();
|
|
}
|
|
- return tempt;
|
|
+ return tempt && this.target != null; // Paper - must have target - plugin might of cancelled
|
|
// CraftBukkit end
|
|
}
|
|
}
|
|
--
|
|
2.18.0
|
|
|