13
0
geforkt von Mirrors/Paper

Fix obfuscator being a little too effective.

Dieser Commit ist enthalten in:
md_5 2013-01-21 17:38:13 +11:00
Ursprung 3d4920ebd6
Commit c22ab4c897

Datei anzeigen

@ -1,4 +1,4 @@
From 8333c7bb34c29dbd71462ef6320e62ca390cdff6 Mon Sep 17 00:00:00 2001
From c78d4989be8b714b9e28ec16ff4569f165824da4 Mon Sep 17 00:00:00 2001
From: lishid <lishid@gmail.com>
Date: Mon, 21 Jan 2013 16:59:04 +1100
Subject: [PATCH] Add oreobfuscator for Spigot.
@ -166,7 +166,7 @@ index 856307f..4861609 100644
public int cactusGrowthModifier = 100;
diff --git a/src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java b/src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java
new file mode 100644
index 0000000..a130ba1
index 0000000..175d04f
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java
@@ -0,0 +1,91 @@
@ -251,14 +251,14 @@ index 0000000..a130ba1
+ }
+
+ private static boolean areAjacentBlocksTransparent(World world, int x, int y, int z, int radius) {
+ return radius > 0 && y > 0 && y <= world.getHeight()
+ && (!Block.i(world.getTypeId(x, y, z))
+ || areAjacentBlocksTransparent(world, x, y + 1, z, radius - 1)
+ return y > 0 && y <= world.getHeight()
+ && !Block.i(world.getTypeId(x, y, z))
+ || (radius > 0 && (areAjacentBlocksTransparent(world, x, y + 1, z, radius - 1)
+ || areAjacentBlocksTransparent(world, x, y - 1, z, radius - 1)
+ || areAjacentBlocksTransparent(world, x + 1, y, z, radius - 1)
+ || areAjacentBlocksTransparent(world, x - 1, y, z, radius - 1)
+ || areAjacentBlocksTransparent(world, x, y, z + 1, radius - 1)
+ || areAjacentBlocksTransparent(world, x, y, z - 1, radius - 1));
+ || areAjacentBlocksTransparent(world, x, y, z - 1, radius - 1)));
+ }
+}
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml