Add sub timings to chunk map

This commit is contained in:
Aikar
2016-06-05 00:10:50 -04:00
parent c2fd63eebf
commit b394ec0472
4 changed files with 138 additions and 24 deletions

View File

@@ -1,4 +1,4 @@
From 6f5ba9138ecbe420a790519709c60850d4e89caa Mon Sep 17 00:00:00 2001
From 1c8fae3651381aeb25d7f4af371147a76b6da5f0 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 14:35:27 -0600
Subject: [PATCH] Add player view distance API
@@ -25,10 +25,10 @@ index 7ef3f62..6e19244 100644
// CraftBukkit start
public String displayName;
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index b0249ff..77e9187 100644
index 797a84f..d554d7d 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -46,7 +46,7 @@ public class PlayerChunkMap {
@@ -47,7 +47,7 @@ public class PlayerChunkMap {
private final List<PlayerChunk> g = Lists.newLinkedList();
private final List<PlayerChunk> h = Lists.newLinkedList();
private final List<PlayerChunk> i = Lists.newArrayList();
@@ -37,7 +37,7 @@ index b0249ff..77e9187 100644
private long k;
private boolean l = true;
private boolean m = true;
@@ -288,8 +288,11 @@ public class PlayerChunkMap {
@@ -303,8 +303,11 @@ public class PlayerChunkMap {
int i = (int) entityplayer.d >> 4;
int j = (int) entityplayer.e >> 4;
@@ -51,7 +51,7 @@ index b0249ff..77e9187 100644
PlayerChunk playerchunk = this.getChunk(k, l);
if (playerchunk != null) {
@@ -319,7 +322,9 @@ public class PlayerChunkMap {
@@ -334,7 +337,9 @@ public class PlayerChunkMap {
if (d2 >= 64.0D) {
int k = (int) entityplayer.d >> 4;
int l = (int) entityplayer.e >> 4;
@@ -62,7 +62,7 @@ index b0249ff..77e9187 100644
int j1 = i - k;
int k1 = j - l;
@@ -328,7 +333,7 @@ public class PlayerChunkMap {
@@ -343,7 +348,7 @@ public class PlayerChunkMap {
if (j1 != 0 || k1 != 0) {
for (int l1 = i - i1; l1 <= i + i1; ++l1) {
for (int i2 = j - i1; i2 <= j + i1; ++i2) {
@@ -71,7 +71,7 @@ index b0249ff..77e9187 100644
// this.c(l1, i2).a(entityplayer);
chunksToLoad.add(new ChunkCoordIntPair(l1, i2)); // CraftBukkit
}
@@ -480,4 +485,20 @@ public class PlayerChunkMap {
@@ -495,4 +500,20 @@ public class PlayerChunkMap {
}
}
// CraftBukkit end
@@ -114,5 +114,5 @@ index 5515958..9770c99 100644
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.8.2.windows.1
2.8.3