summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/BlockMushroom.java
diff options
context:
space:
mode:
authorfeildmaster <admin@feildmaster.com>2013-01-27 10:44:32 -0600
committerfeildmaster <admin@feildmaster.com>2013-01-27 10:44:32 -0600
commit899b9c17cc469851cbc42c5a326869e97b492de4 (patch)
tree1192ebe54aa2e95be9823254bb7cda06bdf634d9 /src/main/java/net/minecraft/server/BlockMushroom.java
parent528bbbdcd896e67067bcf53b95cadb9dc0081ebf (diff)
downloadcraftbukkit-899b9c17cc469851cbc42c5a326869e97b492de4.tar
craftbukkit-899b9c17cc469851cbc42c5a326869e97b492de4.tar.gz
craftbukkit-899b9c17cc469851cbc42c5a326869e97b492de4.tar.lz
craftbukkit-899b9c17cc469851cbc42c5a326869e97b492de4.tar.xz
craftbukkit-899b9c17cc469851cbc42c5a326869e97b492de4.zip
Direct all BlockPlaceEvents to a singular location. Fixes BUKKIT-3438
By having a single function to process BlockPlacement logic, we make it so that there is consistent behavior throughout all BlockPlace events. This should allow for easier troubleshooting and less diffs in source. This also fixes BUKKIT-3463 by including the correct coordinates that were clicked to the event.
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockMushroom.java')
-rw-r--r--src/main/java/net/minecraft/server/BlockMushroom.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/net/minecraft/server/BlockMushroom.java b/src/main/java/net/minecraft/server/BlockMushroom.java
index 38fac4cf..db908749 100644
--- a/src/main/java/net/minecraft/server/BlockMushroom.java
+++ b/src/main/java/net/minecraft/server/BlockMushroom.java
@@ -23,6 +23,7 @@ public class BlockMushroom extends BlockFlower {
}
public void b(World world, int i, int j, int k, Random random) {
+ final int sourceX = i, sourceY = j, sourceZ = k; // CraftBukkit
if (random.nextInt(25) == 0) {
byte b0 = 4;
int l = 5;
@@ -48,12 +49,6 @@ public class BlockMushroom extends BlockFlower {
j1 = j + random.nextInt(2) - random.nextInt(2);
k1 = k + random.nextInt(3) - 1;
- // CraftBukkit start - preserve source block coordinates
- int sourceX = i;
- int sourceY = j;
- int sourceZ = k;
- // CraftBukkit end
-
for (int l1 = 0; l1 < 4; ++l1) {
if (world.isEmpty(i1, j1, k1) && this.d(world, i1, j1, k1)) {
i = i1;