geforkt von Mirrors/Paper
Load correct chunks for spawn chunk loading - Fixes #1866
logic was loading the wrong x/z in block coords instead of chunk coords
Dieser Commit ist enthalten in:
Ursprung
b6d862d618
Commit
2b6aa2fcca
@ -562,7 +562,7 @@ index 2021c0d02e..154ab09e0c 100644
|
|||||||
|
|
||||||
public void putAll(Map<? extends Long, ? extends Chunk> map) {
|
public void putAll(Map<? extends Long, ? extends Chunk> map) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 186cfda7e4..9cdeb3bfc2 100644
|
index 186cfda7e4..781e068770 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||||
@ -597,14 +597,15 @@ index 186cfda7e4..9cdeb3bfc2 100644
|
|||||||
+ public List<ChunkCoordIntPair> getSpiralOutChunks(BlockPosition blockposition, int radius) {
|
+ public List<ChunkCoordIntPair> getSpiralOutChunks(BlockPosition blockposition, int radius) {
|
||||||
+ List<ChunkCoordIntPair> list = com.google.common.collect.Lists.newArrayList();
|
+ List<ChunkCoordIntPair> list = com.google.common.collect.Lists.newArrayList();
|
||||||
+
|
+
|
||||||
|
+ list.add(new ChunkCoordIntPair(blockposition.getX() >> 4, blockposition.getZ() >> 4));
|
||||||
+ for (int r = 1; r <= radius; r++) {
|
+ for (int r = 1; r <= radius; r++) {
|
||||||
+ int x = -r;
|
+ int x = -r;
|
||||||
+ int z = r;
|
+ int z = r;
|
||||||
+ list.add(new ChunkCoordIntPair(blockposition.getX(), blockposition.getZ()));
|
+
|
||||||
+ // Iterates the edge of half of the box; then negates for other half.
|
+ // Iterates the edge of half of the box; then negates for other half.
|
||||||
+ while (x <= r && z > -r) {
|
+ while (x <= r && z > -r) {
|
||||||
+ list.add(new ChunkCoordIntPair(blockposition.getX() + x, blockposition.getZ() + z));
|
+ list.add(new ChunkCoordIntPair((blockposition.getX() + (x << 4)) >> 4, (blockposition.getZ() + (z << 4)) >> 4));
|
||||||
+ list.add(new ChunkCoordIntPair(blockposition.getX() - x, blockposition.getZ() - z));
|
+ list.add(new ChunkCoordIntPair((blockposition.getX() - (x << 4)) >> 4, (blockposition.getZ() - (z << 4)) >> 4));
|
||||||
+
|
+
|
||||||
+ if (x < r) {
|
+ if (x < r) {
|
||||||
+ x++;
|
+ x++;
|
||||||
@ -2318,7 +2319,7 @@ index a9fffa544f..19ce77c4a3 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 8dccf94989..75c4592c21 100644
|
index fac42f8e5c..59b1628e5a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren