mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
57dd397155
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: b999860d SPIGOT-2304: Add LootGenerateEvent CraftBukkit Changes:77fd87e4
SPIGOT-2304: Implement LootGenerateEventa1a705ee
SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent41712edd
SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item
23 lines
1.3 KiB
Diff
23 lines
1.3 KiB
Diff
From 0e1a904edeb60437632d29dcd1a6e4a83dc6c5f9 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Mon, 19 Dec 2016 23:07:42 -0500
|
|
Subject: [PATCH] Prevent Pathfinding out of World Border
|
|
|
|
This prevents Entities from trying to run outside of the World Border
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
index 39a0c45bb0..bdd092e49d 100644
|
|
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
@@ -123,7 +123,7 @@ public abstract class NavigationAbstract {
|
|
// Paper start - Pathfind event
|
|
boolean copiedSet = false;
|
|
for (BlockPosition possibleTarget : set) {
|
|
- if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(),
|
|
+ if (!getEntity().getWorld().getWorldBorder().isInBounds(possibleTarget) || !new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), // Paper - don't path out of world border
|
|
MCUtil.toLocation(getEntity().world, possibleTarget), target == null ? null : target.getBukkitEntity()).callEvent()) {
|
|
if (!copiedSet) {
|
|
copiedSet = true;
|
|
--
|
|
2.26.2
|
|
|