mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Backport a memory cleanup change from 16w14a
This commit is contained in:
parent
c7bdf516da
commit
b605f1f95f
2 changed files with 62 additions and 0 deletions
60
Spigot-Server-Patches/16w14a-memory-cleanup.patch
Normal file
60
Spigot-Server-Patches/16w14a-memory-cleanup.patch
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||||
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/PathfinderAbstract.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/PathfinderAbstract.java
|
||||||
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/PathfinderNormal.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/PathfinderNormal.java
|
||||||
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/PathfinderWater.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/PathfinderWater.java
|
||||||
|
@@ -0,0 +0,0 @@ public class PathfinderWater extends PathfinderAbstract {
|
||||||
|
|
||||||
|
public PathfinderWater() {}
|
||||||
|
|
||||||
|
+ // Paper start - 16w14a backports
|
||||||
|
+ /*
|
||||||
|
public void a(IBlockAccess iblockaccess, EntityInsentient entityinsentient) {
|
||||||
|
super.a(iblockaccess, entityinsentient);
|
||||||
|
}
|
||||||
|
@@ -0,0 +0,0 @@ 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));
|
||||||
|
--
|
|
@ -60,6 +60,8 @@ import PacketPlayOutTitle
|
||||||
import PacketPlayOutUpdateTime
|
import PacketPlayOutUpdateTime
|
||||||
import PathfinderAbstract
|
import PathfinderAbstract
|
||||||
import PathfinderGoalFloat
|
import PathfinderGoalFloat
|
||||||
|
import PathfinderNormal
|
||||||
|
import PathfinderWater
|
||||||
import PersistentVillage
|
import PersistentVillage
|
||||||
import TileEntityEnderChest
|
import TileEntityEnderChest
|
||||||
import WorldProvider
|
import WorldProvider
|
||||||
|
|
Loading…
Reference in a new issue