From 3e2fa68fe62c57b4760d3f42c5664f42c8d39608 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Wed, 30 Jul 2014 02:44:36 -0500 Subject: [PATCH] Temporarily remove the better water lighting updates patch while we ensure there are no performance or implementation issues Specifically around non-water fluids --- .../Better-water-lighting-updates.patch | 105 ------------------ 1 file changed, 105 deletions(-) delete mode 100644 Spigot-Server-Patches/Better-water-lighting-updates.patch diff --git a/Spigot-Server-Patches/Better-water-lighting-updates.patch b/Spigot-Server-Patches/Better-water-lighting-updates.patch deleted file mode 100644 index f16611a2cd..0000000000 --- a/Spigot-Server-Patches/Better-water-lighting-updates.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Iceee -Date: Wed, 23 Jul 2014 09:42:45 -0500 -Subject: [PATCH] Better water lighting updates - - -diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/Chunk.java -+++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -0,0 +0,0 @@ public class Chunk { - private int x; - protected net.minecraft.util.gnu.trove.map.hash.TObjectIntHashMap entityCount = new net.minecraft.util.gnu.trove.map.hash.TObjectIntHashMap(); // Spigot - -+ // PaperSpigot start -+ private boolean waterLightingChanged; -+ private boolean[] waterChanges; -+ private int ticks; -+ // PaperSpigot end -+ - // CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking - private int neighbors = 0x1 << 12; - -@@ -0,0 +0,0 @@ public class Chunk { - this.v = new byte[256]; - this.b = new int[256]; - this.c = new boolean[256]; -+ // PaperSpigot start -+ this.waterChanges = new boolean[256]; -+ // PaperSpigot end - this.tileEntities = new HashMap(); - this.x = 4096; - this.entitySlices = new List[16]; -@@ -0,0 +0,0 @@ public class Chunk { - this.n = true; - } - -+ // PaperSpigot start -+ private void scheduleWaterLightingUpdate(int i, int j) { -+ this.waterChanges[i + j * 16] = true; -+ this.waterLightingChanged = true; -+ } -+ -+ // PaperSpigot end -+ - private void e(int i, int j) { - this.c[i + j * 16] = true; - this.w = true; -@@ -0,0 +0,0 @@ public class Chunk { - if (this.world.areChunksLoaded(this.locX * 16 + 8, 0, this.locZ * 16 + 8, 16)) { - for (int i = 0; i < 16; ++i) { - for (int j = 0; j < 16; ++j) { -- if (this.c[i + j * 16]) { -+ // PaperSpigot start -+ if (this.c[i + j * 16] || this.waterChanges[i + j * 16]) { - this.c[i + j * 16] = false; -+ this.waterChanges[i + j * 16] = false; -+ // PaperSpigot end - int k = this.b(i, j); - int l = this.locX * 16 + i; - int i1 = this.locZ * 16 + j; -@@ -0,0 +0,0 @@ public class Chunk { - } - - this.w = false; -+ // PaperSpigot start -+ this.waterLightingChanged = false; -+ // PaperSpigot end - } - - this.world.methodProfiler.b(); -@@ -0,0 +0,0 @@ public class Chunk { - } - - if (j2 != k2 && (j2 < k2 || this.getBrightness(EnumSkyBlock.SKY, i, j, k) > 0 || this.getBrightness(EnumSkyBlock.BLOCK, i, j, k) > 0)) { -- this.e(i, k); -+ // PaperSpigot start -+ if(block.material == Material.WATER || block1.material == Material.WATER) { -+ this.scheduleWaterLightingUpdate(i, k); -+ } else { -+ this.e(i, k); -+ } -+ // PaperSpigot end - } - } - -@@ -0,0 +0,0 @@ public class Chunk { - } - - public void b(boolean flag) { -- if (this.w && !this.world.worldProvider.g && !flag) { -+ // PaperSpigot start -+ ++ticks; -+ if(ticks % 20 == 0 && this.waterLightingChanged) { -+ this.c(this.world.isStatic); -+ } else if (this.w && !this.world.worldProvider.g && !flag) { - this.c(this.world.isStatic); - } -+ // PaperSpigot end - - this.m = true; - if (!this.lit && this.done && this.world.spigotConfig.randomLightUpdates) { // Spigot - also use random light updates setting to determine if we should relight --- -1.9.4.msysgit.0 -