Damn I hate mode #2

This commit is contained in:
md_5 2013-07-28 20:29:49 +10:00
parent a8269a5119
commit cb44b83822

View file

@ -1,4 +1,4 @@
From 7c011c07c77395789c96298dd5745a74dec4c84d Mon Sep 17 00:00:00 2001
From 08ff6f95339bf788c1d8a79c53642cdab3b72c2f Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 16 May 2013 18:51:05 +1000
Subject: [PATCH] Orebfuscator
@ -108,7 +108,7 @@ index a7afa55..1a60229 100644
diff --git a/src/main/java/org/spigotmc/AntiXray.java b/src/main/java/org/spigotmc/AntiXray.java
new file mode 100644
index 0000000..0128d11
index 0000000..59bae3b
--- /dev/null
+++ b/src/main/java/org/spigotmc/AntiXray.java
@@ -0,0 +1,186 @@
@ -209,7 +209,7 @@ index 0000000..0128d11
+ // TODO: extended IDs are not yet supported
+ int blockId = buffer[index] & 0xFF;
+ // Check if the block should be obfuscated
+ if ( obfuscateBlocks[blockId] )
+ if ( obfuscateBlocks[blockId] || replaceBlocks[blockId] )
+ {
+ // TODO: Don't really understand this, but if radius is not 0 and the world isn't loaded, bail out
+ if ( initialRadius != 0 && !isLoaded( world, startX + x, ( i << 4 ) + y, startZ + z, initialRadius ) )
@ -255,7 +255,7 @@ index 0000000..0128d11
+ int id = world.getTypeId( x, y, z );
+
+ // See if it needs update
+ if ( updateSelf && ( obfuscateBlocks[id] || world.spigotConfig.xRayReplacements.contains( id ) ) )
+ if ( updateSelf && ( obfuscateBlocks[id] || replaceBlocks[id] ) )
+ {
+ // Send the update
+ world.notify( x, y, z );