Fix Player View Distance API corrupting Chunk Sending - Fixes #207

The Player View Distance patch has been screwing with the configured world view distance.

The world a player was created in would set the players view distance, which would be locked to that distance.

Then switching worlds would not give you an updated view distance.

This then caused issues with what view distance the player should have in the chunk map and did not send chunks to the client correctly during movement.

This patch has now been changed to use a -1 default for "default" and will not override view distance until someone has actually used the API to change it.
This commit is contained in:
Aikar
2016-04-23 21:39:22 -04:00
parent ef8ee10bd6
commit 8b2f631d9b
2 changed files with 50 additions and 23 deletions

View File

@@ -23,9 +23,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public int ping;
public boolean viewingCredits;
public int viewDistance; // Paper - Player view distance API
this.viewDistance = viewDistance;
}
// Paper end
+ private int containerUpdateDelay; // Paper
// CraftBukkit start