2016-03-29 03:24:45 +02:00
|
|
|
From 0000000000000000000000000000000000000000 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
|
2017-05-14 20:05:01 +02:00
|
|
|
index 3e598afd4..3871ad017 100644
|
2016-03-29 03:24:45 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
2016-05-12 04:07:46 +02:00
|
|
|
@@ -0,0 +0,0 @@ import javax.annotation.Nullable;
|
2016-06-09 05:57:14 +02:00
|
|
|
|
2016-03-29 03:24:45 +02:00
|
|
|
public abstract class NavigationAbstract {
|
|
|
|
|
|
|
|
- protected EntityInsentient a;
|
2016-06-09 05:57:14 +02:00
|
|
|
+ protected EntityInsentient a; public Entity getEntity() { return a; } // Paper - OBFHELPER
|
2016-03-29 03:24:45 +02:00
|
|
|
protected World b;
|
2016-05-12 04:07:46 +02:00
|
|
|
@Nullable
|
2016-03-29 03:24:45 +02:00
|
|
|
protected PathEntity c;
|
|
|
|
@@ -0,0 +0,0 @@ public abstract class NavigationAbstract {
|
2016-06-09 05:57:14 +02:00
|
|
|
} else if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
2016-03-29 03:24:45 +02:00
|
|
|
return this.c;
|
|
|
|
} else {
|
|
|
|
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(getEntity().world, blockposition), null).callEvent()) { return null; } // Paper
|
2016-06-09 05:57:14 +02:00
|
|
|
this.q = blockposition;
|
2017-05-14 20:05:01 +02:00
|
|
|
float f = this.i();
|
2016-03-29 03:24:45 +02:00
|
|
|
|
|
|
|
@@ -0,0 +0,0 @@ public abstract class NavigationAbstract {
|
2016-06-09 05:57:14 +02:00
|
|
|
if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
2016-03-29 03:24:45 +02:00
|
|
|
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
|
2016-06-09 05:57:14 +02:00
|
|
|
this.q = blockposition;
|
2017-05-14 20:05:01 +02:00
|
|
|
float f = this.i();
|
2016-03-29 03:24:45 +02:00
|
|
|
|
|
|
|
--
|