From 3d4d83088b2df25f12b29b1e4b94765f0a2062da Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 16 May 2013 20:05:02 +1000 Subject: [PATCH] Orebfuscator fully functioning, more effective, more efficient! --- CraftBukkit-Patches/0015-Orebfuscator.patch | 44 +++++++++------------ 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/CraftBukkit-Patches/0015-Orebfuscator.patch b/CraftBukkit-Patches/0015-Orebfuscator.patch index 0fbf35d..1a22e12 100644 --- a/CraftBukkit-Patches/0015-Orebfuscator.patch +++ b/CraftBukkit-Patches/0015-Orebfuscator.patch @@ -1,4 +1,4 @@ -From 363c2838f5c2179bb6c0ad3cb7da777bd0ba63f6 Mon Sep 17 00:00:00 2001 +From 1f02c5a6aeba3f32a2a162437d3a43d589f2f96d Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 16 May 2013 18:51:05 +1000 Subject: [PATCH] Orebfuscator @@ -173,10 +173,10 @@ index 67477f4..e5004b3 100644 } diff --git a/src/main/java/org/spigotmc/OrebfuscatorManager.java b/src/main/java/org/spigotmc/OrebfuscatorManager.java new file mode 100644 -index 0000000..003bc5d +index 0000000..2adfb86 --- /dev/null +++ b/src/main/java/org/spigotmc/OrebfuscatorManager.java -@@ -0,0 +1,211 @@ +@@ -0,0 +1,205 @@ +package org.spigotmc; + +import gnu.trove.set.TByteSet; @@ -360,32 +360,26 @@ index 0000000..003bc5d + + private static boolean isLoaded(World world, int x, int y, int z, int radius) + { -+ if ( radius > 0 && world.isLoaded( x, y, z ) ) -+ { -+ return isLoaded( world, x + 1, y, z, radius - 1 ) -+ || isLoaded( world, x - 1, y, z, radius - 1 ) -+ || isLoaded( world, x, y + 1, z, radius - 1 ) -+ || isLoaded( world, x, y - 1, z, radius - 1 ) -+ || isLoaded( world, x, y, z + 1, radius - 1 ) -+ || isLoaded( world, x, y, z - 1, radius - 1 ); -+ } -+ -+ return false; ++ return world.isLoaded( x, y, z ) ++ || ( radius > 0 ++ && ( isLoaded( world, x + 1, y, z, radius - 1 ) ++ || isLoaded( world, x - 1, y, z, radius - 1 ) ++ || isLoaded( world, x, y + 1, z, radius - 1 ) ++ || isLoaded( world, x, y - 1, z, radius - 1 ) ++ || isLoaded( world, x, y, z + 1, radius - 1 ) ++ || isLoaded( world, x, y, z - 1, radius - 1 ) ) ); + } + + private static boolean hasTransparentBlockAdjacent(World world, int x, int y, int z, int radius) + { -+ if ( radius > 0 && !Block.l( world.getTypeId( x, y, z ) ) /* isSolidBlock */ ) -+ { -+ return hasTransparentBlockAdjacent( world, x + 1, y, z, radius - 1 ) -+ || hasTransparentBlockAdjacent( world, x - 1, y, z, radius - 1 ) -+ || hasTransparentBlockAdjacent( world, x, y + 1, z, radius - 1 ) -+ || hasTransparentBlockAdjacent( world, x, y - 1, z, radius - 1 ) -+ || hasTransparentBlockAdjacent( world, x, y, z + 1, radius - 1 ) -+ || hasTransparentBlockAdjacent( world, x, y, z - 1, radius - 1 ); -+ } -+ -+ return false; ++ return !Block.l( world.getTypeId( x, y, z ) ) /* isSolidBlock */ ++ || ( radius > 0 ++ && ( hasTransparentBlockAdjacent( world, x + 1, y, z, radius - 1 ) ++ || hasTransparentBlockAdjacent( world, x - 1, y, z, radius - 1 ) ++ || hasTransparentBlockAdjacent( world, x, y + 1, z, radius - 1 ) ++ || hasTransparentBlockAdjacent( world, x, y - 1, z, radius - 1 ) ++ || hasTransparentBlockAdjacent( world, x, y, z + 1, radius - 1 ) ++ || hasTransparentBlockAdjacent( world, x, y, z - 1, radius - 1 ) ) ); + } +} diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml