mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +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
40 lines
1.8 KiB
Diff
40 lines
1.8 KiB
Diff
From da0eaa98bb3f62b2ddc2b3c3b4a29719605594da Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Mon, 28 Mar 2016 21:22:26 -0400
|
|
Subject: [PATCH] EntityPathfindEvent
|
|
|
|
Fires when an Entity decides to start moving to a location.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
index 8111317e31..76d1f4bd21 100644
|
|
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
@@ -4,7 +4,7 @@ import javax.annotation.Nullable;
|
|
|
|
public abstract class NavigationAbstract {
|
|
|
|
- protected EntityInsentient a;
|
|
+ protected EntityInsentient a; public Entity getEntity() { return a; } // Paper - OBFHELPER
|
|
protected World b;
|
|
@Nullable
|
|
protected PathEntity c;
|
|
@@ -78,6 +78,7 @@ public abstract class NavigationAbstract {
|
|
} else if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
|
return this.c;
|
|
} else {
|
|
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(getEntity().world, blockposition), null).callEvent()) { return null; } // Paper
|
|
this.q = blockposition;
|
|
float f = this.j();
|
|
|
|
@@ -102,6 +103,7 @@ public abstract class NavigationAbstract {
|
|
if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
|
return this.c;
|
|
} else {
|
|
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(entity.world, blockposition), entity.getBukkitEntity()).callEvent()) { return null; } // Paper
|
|
this.q = blockposition;
|
|
float f = this.j();
|
|
|
|
--
|
|
2.18.0
|
|
|