Use correct bitmask variable for orebfuscator
This commit is contained in:
parent
31f53fbbbe
commit
12358efad3
1 changed files with 6 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
From ed7b1fa657976910f496b8cdcaf25e38aecc3f26 Mon Sep 17 00:00:00 2001
|
From b1f48210131c8ca7b879452ca7b60a4bd578a826 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Thu, 16 May 2013 18:51:05 +1000
|
Date: Thu, 16 May 2013 18:51:05 +1000
|
||||||
Subject: [PATCH] Orebfuscator
|
Subject: [PATCH] Orebfuscator
|
||||||
|
@ -49,14 +49,14 @@ index 09b34e9..e80d8b9 100644
|
||||||
try {
|
try {
|
||||||
this.buffer = chunkmap.a;
|
this.buffer = chunkmap.a;
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
||||||
index bf3a139..ce44ad6 100644
|
index bf3a139..fc92026 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
||||||
@@ -43,6 +43,7 @@ public class PacketPlayOutMapChunkBulk extends Packet {
|
@@ -43,6 +43,7 @@ public class PacketPlayOutMapChunkBulk extends Packet {
|
||||||
for (int k = 0; k < i; ++k) {
|
for (int k = 0; k < i; ++k) {
|
||||||
Chunk chunk = (Chunk) list.get(k);
|
Chunk chunk = (Chunk) list.get(k);
|
||||||
ChunkMap chunkmap = PacketPlayOutMapChunk.a(chunk, true, '\uffff');
|
ChunkMap chunkmap = PacketPlayOutMapChunk.a(chunk, true, '\uffff');
|
||||||
+ chunk.world.spigotConfig.antiXrayInstance.obfuscate(chunk.locX, chunk.locZ, i, chunkmap.a, chunk.world); // Spigot
|
+ chunk.world.spigotConfig.antiXrayInstance.obfuscate(chunk.locX, chunk.locZ, chunkmap.b, chunkmap.a, chunk.world); // Spigot
|
||||||
|
|
||||||
if (buildBuffer.length < j + chunkmap.a.length) {
|
if (buildBuffer.length < j + chunkmap.a.length) {
|
||||||
byte[] abyte = new byte[j + chunkmap.a.length];
|
byte[] abyte = new byte[j + chunkmap.a.length];
|
||||||
|
@ -86,7 +86,7 @@ index 5b0875d..1aca7f6 100644
|
||||||
public void b(int i, int j, int k, Block block, int l) {
|
public void b(int i, int j, int k, Block block, int l) {
|
||||||
diff --git a/src/main/java/org/spigotmc/AntiXray.java b/src/main/java/org/spigotmc/AntiXray.java
|
diff --git a/src/main/java/org/spigotmc/AntiXray.java b/src/main/java/org/spigotmc/AntiXray.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..ab01d3b
|
index 0000000..8230ff1
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/org/spigotmc/AntiXray.java
|
+++ b/src/main/java/org/spigotmc/AntiXray.java
|
||||||
@@ -0,0 +1,188 @@
|
@@ -0,0 +1,188 @@
|
||||||
|
@ -149,7 +149,7 @@ index 0000000..ab01d3b
|
||||||
+ /**
|
+ /**
|
||||||
+ * Removes all non exposed ores from the chunk buffer.
|
+ * Removes all non exposed ores from the chunk buffer.
|
||||||
+ */
|
+ */
|
||||||
+ public void obfuscate(int chunkX, int chunkY, int bitmask, byte[] buffer, World world)
|
+ public void obfuscate(int chunkX, int chunkZ, int bitmask, byte[] buffer, World world)
|
||||||
+ {
|
+ {
|
||||||
+ // If the world is marked as obfuscated
|
+ // If the world is marked as obfuscated
|
||||||
+ if ( world.spigotConfig.antiXray )
|
+ if ( world.spigotConfig.antiXray )
|
||||||
|
@ -164,7 +164,7 @@ index 0000000..ab01d3b
|
||||||
+
|
+
|
||||||
+ // Chunk corner X and Z blocks
|
+ // Chunk corner X and Z blocks
|
||||||
+ int startX = chunkX << 4;
|
+ int startX = chunkX << 4;
|
||||||
+ int startZ = chunkY << 4;
|
+ int startZ = chunkZ << 4;
|
||||||
+
|
+
|
||||||
+ // Chunks can have up to 16 sections
|
+ // Chunks can have up to 16 sections
|
||||||
+ for ( int i = 0; i < 16; i++ )
|
+ for ( int i = 0; i < 16; i++ )
|
||||||
|
|
Loading…
Reference in a new issue