13
0
geforkt von Mirrors/Paper

Fix issue with setting player view distance

Dieser Commit ist enthalten in:
totokaka 2016-06-18 20:52:11 -05:00
Ursprung 76ccb4c5f0
Commit cd0d4d1674

Datei anzeigen

@ -37,6 +37,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
private long k;
private boolean l = true;
private boolean m = true;
@@ -0,0 +0,0 @@ public class PlayerChunkMap {
// CraftBukkit start - Load nearby chunks first
List<ChunkCoordIntPair> chunkList = new LinkedList<ChunkCoordIntPair>();
- for (int k = i - this.j; k <= i + this.j; ++k) {
- for (int l = j - this.j; l <= j + this.j; ++l) {
+ // Paper start - Player view distance API
+ int viewDistance = entityplayer.getViewDistance();
+ for (int k = i - viewDistance; k <= i + viewDistance; ++k) {
+ for (int l = j - viewDistance; l <= j + viewDistance; ++l) {
+ // Paper end
chunkList.add(new ChunkCoordIntPair(k, l));
}
}
@@ -0,0 +0,0 @@ public class PlayerChunkMap {
int i = (int) entityplayer.d >> 4;
int j = (int) entityplayer.e >> 4;