diff --git a/Spigot-Server-Patches/0131-16w14a-memory-cleanup.patch b/Spigot-Server-Patches/0131-16w14a-memory-cleanup.patch new file mode 100644 index 000000000..bd76d039d --- /dev/null +++ b/Spigot-Server-Patches/0131-16w14a-memory-cleanup.patch @@ -0,0 +1,62 @@ +From 20d29320370506bfbb1b409bda2102a82a671168 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Thu, 7 Apr 2016 18:28:06 -0500 +Subject: [PATCH] 16w14a memory cleanup + + +diff --git a/src/main/java/net/minecraft/server/PathfinderAbstract.java b/src/main/java/net/minecraft/server/PathfinderAbstract.java +index 51f3758..9f5216e 100644 +--- a/src/main/java/net/minecraft/server/PathfinderAbstract.java ++++ b/src/main/java/net/minecraft/server/PathfinderAbstract.java +@@ -23,7 +23,11 @@ public abstract class PathfinderAbstract { + this.f = MathHelper.d(entityinsentient.width + 1.0F); + } + +- public void a() { this.a = (IBlockAccess) null; } // CraftBukkit - don't leak Chunk Cache ++ // Paper start - 16w14a backports ++ public void a() { ++ this.a = (IBlockAccess) null; // CraftBukkit - don't leak Chunk Cache ++ this.b = null; ++ } + + protected PathPoint a(int i, int j, int k) { + int l = PathPoint.b(i, j, k); +diff --git a/src/main/java/net/minecraft/server/PathfinderNormal.java b/src/main/java/net/minecraft/server/PathfinderNormal.java +index 0e4fa08..4f1df46 100644 +--- a/src/main/java/net/minecraft/server/PathfinderNormal.java ++++ b/src/main/java/net/minecraft/server/PathfinderNormal.java +@@ -16,8 +16,8 @@ public class PathfinderNormal extends PathfinderAbstract { + } + + public void a() { +- super.a(); + this.b.a(PathType.WATER, this.j); ++ super.a(); // Paper - 16w14a backports + } + + public PathPoint b() { +diff --git a/src/main/java/net/minecraft/server/PathfinderWater.java b/src/main/java/net/minecraft/server/PathfinderWater.java +index dc7f310..c1df684 100644 +--- a/src/main/java/net/minecraft/server/PathfinderWater.java ++++ b/src/main/java/net/minecraft/server/PathfinderWater.java +@@ -4,6 +4,8 @@ public class PathfinderWater extends PathfinderAbstract { + + public PathfinderWater() {} + ++ // Paper start - 16w14a backports ++ /* + public void a(IBlockAccess iblockaccess, EntityInsentient entityinsentient) { + super.a(iblockaccess, entityinsentient); + } +@@ -11,6 +13,8 @@ public class PathfinderWater extends PathfinderAbstract { + public void a() { + super.a(); + } ++ */ ++ // Paper end + + public PathPoint b() { + return this.a(MathHelper.floor(this.b.getBoundingBox().a), MathHelper.floor(this.b.getBoundingBox().b + 0.5D), MathHelper.floor(this.b.getBoundingBox().c)); +-- +2.8.0 + diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index 638a7e70c..e708c2990 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -60,6 +60,8 @@ import PacketPlayOutTitle import PacketPlayOutUpdateTime import PathfinderAbstract import PathfinderGoalFloat +import PathfinderNormal +import PathfinderWater import PersistentVillage import TileEntityEnderChest import WorldProvider