remove more obfhelpers

This commit is contained in:
Jake Potrebic
2021-06-17 14:39:36 -07:00
parent 6c9cd70194
commit 570006ab1e
43 changed files with 130 additions and 550 deletions

View File

@@ -427,7 +427,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Prioritize circular near
+ double playerChunkX = Mth.floor(player.getX()) >> 4;
+ double playerChunkZ = Mth.floor(player.getZ()) >> 4;
+ pos.setValues(player.getX(), 0, player.getZ());
+ pos.set(player.getX(), 0, player.getZ());
+ double twoThirdModifier = 2D / 3D;
+ MCUtil.getSpiralOutChunks(pos, Math.min(6, viewDistance)).forEach(coord -> {
+ if (shouldSkipPrioritization(coord)) return;
@@ -445,7 +445,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ // Prioritize Frustum near 3
+ ChunkPos front3 = player.getChunkInFront(3);
+ pos.setValues(front3.x << 4, 0, front3.z << 4);
+ pos.set(front3.x << 4, 0, front3.z << 4);
+ MCUtil.getSpiralOutChunks(pos, Math.min(5, viewDistance)).forEach(coord -> {
+ if (shouldSkipPrioritization(coord)) return;
+
@@ -456,7 +456,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Prioritize Frustum near 5
+ if (viewDistance > 4) {
+ ChunkPos front5 = player.getChunkInFront(5);
+ pos.setValues(front5.x << 4, 0, front5.z << 4);
+ pos.set(front5.x << 4, 0, front5.z << 4);
+ MCUtil.getSpiralOutChunks(pos, 4).forEach(coord -> {
+ if (shouldSkipPrioritization(coord)) return;
+
@@ -468,7 +468,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Prioritize Frustum far 7
+ if (viewDistance > 6) {
+ ChunkPos front7 = player.getChunkInFront(7);
+ pos.setValues(front7.x << 4, 0, front7.z << 4);
+ pos.set(front7.x << 4, 0, front7.z << 4);
+ MCUtil.getSpiralOutChunks(pos, 3).forEach(coord -> {
+ if (shouldSkipPrioritization(coord)) {
+ return;
@@ -878,16 +878,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ ServerPlayer player = (ServerPlayer) backingSet[index];
+
+ ChunkPos pointInFront = player.getChunkInFront(5);
+ pos.setValues(pointInFront.x << 4, 0, pointInFront.z << 4);
+ pos.set(pointInFront.x << 4, 0, pointInFront.z << 4);
+ double frontDist = net.minecraft.server.MCUtil.distanceSq(pos, blockPos);
+
+ pos.setValues(player.getX(), 0, player.getZ());
+ pos.set(player.getX(), 0, player.getZ());
+ double center = net.minecraft.server.MCUtil.distanceSq(pos, blockPos);
+
+ double dist = Math.min(frontDist, center);
+ if (!isFront) {
+ ChunkPos pointInBack = player.getChunkInFront(-7);
+ pos.setValues(pointInBack.x << 4, 0, pointInBack.z << 4);
+ pos.set(pointInBack.x << 4, 0, pointInBack.z << 4);
+ double backDist = net.minecraft.server.MCUtil.distanceSq(pos, blockPos);
+ if (frontDist < backDist) {
+ isFront = true;
@@ -1126,7 +1126,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ worldserver1.getChunkSource().getChunkAtAsynchronously(chunkX, chunkZ, true, false).thenApply(chunk -> { // Paper - Chunk priority
net.minecraft.server.level.ChunkHolder updatingChunk = playerChunkMap.getUpdatingChunkIfPresent(pos.toLong());
if (updatingChunk != null) {
return updatingChunk.getEntityTickingFuture();
return updatingChunk.getEntityTickingChunkFuture();
@@ -0,0 +0,0 @@ public abstract class PlayerList {
SocketAddress socketaddress = loginlistener.connection.getRemoteAddress();