3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-17 13:30:06 +01:00

Invalid position errors for chunks now display what world they're for

Dieser Commit ist enthalten in:
Dinnerbone 2011-09-17 14:52:30 +01:00
Ursprung 0ae6e11761
Commit f5957c1831
2 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -7,6 +7,7 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Random; import java.util.Random;
import org.bukkit.Bukkit;
public class Chunk { public class Chunk {
@ -511,10 +512,11 @@ public class Chunk {
int j = MathHelper.floor(entity.locZ / 16.0D); int j = MathHelper.floor(entity.locZ / 16.0D);
if (i != this.x || j != this.z) { if (i != this.x || j != this.z) {
System.out.println("Wrong location! " + entity); // CraftBukkit start
// Thread.dumpStack(); // CraftBukkit Bukkit.getLogger().warning("Wrong location for " + entity + " in world '" + world.getWorld().getName() + "'!");
// CraftBukkit // Thread.dumpStack();
System.out.println("" + entity.locX + "," + entity.locZ + "(" + i + "," + j + ") vs " + this.x + "," + this.z); Bukkit.getLogger().warning("Entity is at " + entity.locX + "," + entity.locZ + " (chunk " + i + "," + j + ") but was stored in chunk " + this.x + "," + this.z);
// CraftBukkit end
} }
int k = MathHelper.floor(entity.locY / 16.0D); int k = MathHelper.floor(entity.locY / 16.0D);

Datei anzeigen

@ -106,8 +106,8 @@ public class ChunkProviderServer implements IChunkProvider {
chunk = chunk == null ? (!this.world.isLoading && !this.forceChunkLoad ? this.emptyChunk : this.getChunkAt(i, j)) : chunk; chunk = chunk == null ? (!this.world.isLoading && !this.forceChunkLoad ? this.emptyChunk : this.getChunkAt(i, j)) : chunk;
if (chunk == this.emptyChunk) return chunk; if (chunk == this.emptyChunk) return chunk;
if (i != chunk.x || j != chunk.z) { if (i != chunk.x || j != chunk.z) {
MinecraftServer.log.info("Chunk (" + chunk.x + ", " + chunk.z + ") stored at (" + i + ", " + j + ")"); MinecraftServer.log.severe("Chunk (" + chunk.x + ", " + chunk.z + ") stored at (" + i + ", " + j + ") in world '" + world.getWorld().getName() + "'");
MinecraftServer.log.info(chunk.getClass().getName()); MinecraftServer.log.severe(chunk.getClass().getName());
Throwable ex = new Throwable(); Throwable ex = new Throwable();
ex.fillInStackTrace(); ex.fillInStackTrace();
ex.printStackTrace(); ex.printStackTrace();