Fixed issue with abandoned chunks.

This commit is contained in:
LexManos 2012-11-26 20:06:23 -08:00
parent 26159e3ed9
commit 4bf2dbaeb7

View file

@ -1,12 +1,14 @@
--- ../src_base/common/net/minecraft/src/PlayerInstance.java --- ../src_base/common/net/minecraft/src/PlayerInstance.java
+++ ../src_work/common/net/minecraft/src/PlayerInstance.java +++ ../src_work/common/net/minecraft/src/PlayerInstance.java
@@ -137,6 +137,9 @@ @@ -137,7 +137,10 @@
if ((this.field_73260_f & 1 << var3) != 0) if ((this.field_73260_f & 1 << var3) != 0)
{ {
var4 = var3 << 4; var4 = var3 << 4;
- List var5 = PlayerManager.getWorldServer(this.myManager).getAllTileEntityInBox(var1, var4, var2, var1 + 16, var4 + 16, var2 + 16);
+ //BugFix: 16 makes it load an extra chunk, which isn't associated with a player, which makes it not unload unless a player walks near it. + //BugFix: 16 makes it load an extra chunk, which isn't associated with a player, which makes it not unload unless a player walks near it.
+ //ToDo: Find a way to efficiently clean abandoned chunks. + //ToDo: Find a way to efficiently clean abandoned chunks.
+ //List var5 = PlayerManager.getWorldServer(this.myManager).getAllTileEntityInBox(var1, var4, var2, var1 + 15, var4 + 16, var2 + 15); + //List var5 = PlayerManager.getWorldServer(this.myManager).getAllTileEntityInBox(var1, var4, var2, var1 + 16, var4 + 16, var2 + 16);
List var5 = PlayerManager.getWorldServer(this.myManager).getAllTileEntityInBox(var1, var4, var2, var1 + 16, var4 + 16, var2 + 16); + List var5 = PlayerManager.getWorldServer(this.myManager).getAllTileEntityInBox(var1, var4, var2, var1 + 15, var4 + 16, var2 + 15);
for (int var6 = 0; var6 < var5.size(); ++var6) for (int var6 = 0; var6 < var5.size(); ++var6)
{