mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-15 07:01:36 +08:00
b62dfa0bf9
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers CraftBukkit Changes:1cf8b5dc
SPIGOT-4400: Populators running on existing chunks116cb9a1
SPIGOT-4399: Add attribute modifier equality test5ee1c18a
SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
40 lines
1.9 KiB
Diff
40 lines
1.9 KiB
Diff
From 662cf614a03e90feb9aaad1d22300aee82391b4c 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 5d6f726d05..a8b070ed32 100644
|
|
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
@@ -3,7 +3,7 @@ package net.minecraft.server;
|
|
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;
|
|
@@ -74,6 +74,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 fx = this.j();
|
|
this.b.methodProfiler.a("pathfind");
|
|
@@ -95,6 +96,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 fx = this.j();
|
|
this.b.methodProfiler.a("pathfind");
|
|
--
|
|
2.19.0
|
|
|