Quick fix for oreobf crash, @lishid

This commit is contained in:
md_5 2013-01-24 09:13:53 +11:00
parent 5fc216e651
commit 059fcbc8bd

View File

@ -1,4 +1,4 @@
From 247b905d9553d0f0fe899e8569ce638053e0e66d Mon Sep 17 00:00:00 2001
From 3ab7a7febeae0b35fc8cb278d2a26414b05ec5f7 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.
@ -10,10 +10,10 @@ Subject: [PATCH] Add oreobfuscator for Spigot.
.../minecraft/server/PlayerInteractManager.java | 5 ++
.../java/org/bukkit/craftbukkit/CraftServer.java | 5 ++
.../java/org/bukkit/craftbukkit/CraftWorld.java | 4 +
.../bukkit/craftbukkit/OrebfuscatorManager.java | 93 ++++++++++++++++++++++
.../bukkit/craftbukkit/OrebfuscatorManager.java | 95 ++++++++++++++++++++++
src/main/java/org/bukkit/craftbukkit/Spigot.java | 4 +
src/main/resources/configurations/bukkit.yml | 5 ++
9 files changed, 138 insertions(+), 1 deletion(-)
9 files changed, 140 insertions(+), 1 deletion(-)
create mode 100644 src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
@ -156,10 +156,10 @@ 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..6d5a519
index 0000000..1ac8c26
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java
@@ -0,0 +1,93 @@
@@ -0,0 +1,95 @@
+package org.bukkit.craftbukkit;
+
+import net.minecraft.server.Block;
@ -209,7 +209,9 @@ index 0000000..6d5a519
+ buffer[index] = (byte) Block.STONE.id;
+ }
+ }
+ index++;
+ if (++index > buffer.length) {
+ return;
+ }
+ }
+ }
+ }