From 059fcbc8bd019d546a009324dab6fc5c1a389dc3 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 24 Jan 2013 09:13:53 +1100 Subject: [PATCH] Quick fix for oreobf crash, @lishid --- .../0021-Add-oreobfuscator-for-Spigot.patch | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CraftBukkit-Patches/0021-Add-oreobfuscator-for-Spigot.patch b/CraftBukkit-Patches/0021-Add-oreobfuscator-for-Spigot.patch index af5db932f..7f0b36c6a 100644 --- a/CraftBukkit-Patches/0021-Add-oreobfuscator-for-Spigot.patch +++ b/CraftBukkit-Patches/0021-Add-oreobfuscator-for-Spigot.patch @@ -1,4 +1,4 @@ -From 247b905d9553d0f0fe899e8569ce638053e0e66d Mon Sep 17 00:00:00 2001 +From 3ab7a7febeae0b35fc8cb278d2a26414b05ec5f7 Mon Sep 17 00:00:00 2001 From: lishid 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; ++ } + } + } + }