Fix lightning - use vanilla lightning code.

By: md_5 <md_5@live.com.au>
This commit is contained in:
Spigot
2013-01-22 15:58:34 +11:00
parent 8d43341f1a
commit 825efdfc3b
6 changed files with 67 additions and 385 deletions

View File

@@ -1,4 +1,4 @@
From 2af2697578d73f9965a4578afe80aa49a0cd30ab Mon Sep 17 00:00:00 2001
From 5cfd2fa15e41201cc36959046d6a1c5ac860b265 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 10 Jan 2013 00:18:11 -0500
Subject: [PATCH] Add Custom Timings to various points
@@ -210,7 +210,7 @@ index 43a24f5..7ca0acf 100644
/* CraftBukkit start - No longer needed as we have already handled it in server.dispatchServerCommand above.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e28aa00..3c6adb6 100644
index 39e6110..46e8d11 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -14,6 +14,7 @@ import java.util.concurrent.Callable;
@@ -221,7 +221,7 @@ index e28aa00..3c6adb6 100644
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.CraftWorld;
@@ -114,6 +115,7 @@ public abstract class World implements IBlockAccess {
@@ -113,6 +114,7 @@ public abstract class World implements IBlockAccess {
final Object chunkLock = new Object();
private byte chunkTickRadius;
@@ -229,7 +229,7 @@ index e28aa00..3c6adb6 100644
public CraftWorld getWorld() {
return this.world;
}
@@ -193,6 +195,7 @@ public abstract class World implements IBlockAccess {
@@ -192,6 +194,7 @@ public abstract class World implements IBlockAccess {
this.a();
this.getServer().addWorld(this.world); // CraftBukkit
@@ -237,7 +237,7 @@ index e28aa00..3c6adb6 100644
}
protected abstract IChunkProvider j();
@@ -1207,6 +1210,7 @@ public abstract class World implements IBlockAccess {
@@ -1206,6 +1209,7 @@ public abstract class World implements IBlockAccess {
CrashReport crashreport;
CrashReportSystemDetails crashreportsystemdetails;
@@ -245,7 +245,7 @@ index e28aa00..3c6adb6 100644
for (i = 0; i < this.i.size(); ++i) {
entity = (Entity) this.i.get(i);
// CraftBukkit start - fixed an NPE, don't process entities in chunks queued for unload
@@ -1261,7 +1265,9 @@ public abstract class World implements IBlockAccess {
@@ -1260,7 +1264,9 @@ public abstract class World implements IBlockAccess {
this.f.clear();
this.methodProfiler.c("regular");
@@ -255,7 +255,7 @@ index e28aa00..3c6adb6 100644
for (i = 0; i < this.entityList.size(); ++i) {
entity = (Entity) this.entityList.get(i);
@@ -1314,7 +1320,9 @@ public abstract class World implements IBlockAccess {
@@ -1313,7 +1319,9 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.b();
}
@@ -265,7 +265,7 @@ index e28aa00..3c6adb6 100644
this.M = true;
Iterator iterator = this.tileEntityList.iterator();
@@ -1393,6 +1401,7 @@ public abstract class World implements IBlockAccess {
@@ -1392,6 +1400,7 @@ public abstract class World implements IBlockAccess {
this.a.clear();
}
@@ -274,7 +274,7 @@ index e28aa00..3c6adb6 100644
this.methodProfiler.b();
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index faa56ac..b7ab326 100644
index 842d722..eb268ad 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -157,9 +157,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate