mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-09 09:01:36 +01:00
Fix issue with setting player view distance
This commit is contained in:
parent
76ccb4c5f0
commit
cd0d4d1674
@ -37,6 +37,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
private long k;
|
private long k;
|
||||||
private boolean l = true;
|
private boolean l = true;
|
||||||
private boolean m = 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 {
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap {
|
||||||
int i = (int) entityplayer.d >> 4;
|
int i = (int) entityplayer.d >> 4;
|
||||||
int j = (int) entityplayer.e >> 4;
|
int j = (int) entityplayer.e >> 4;
|
||||||
|
Loading…
Reference in New Issue
Block a user