From d74145ef23455c63f91bd667aa772fa40f0e659a Mon Sep 17 00:00:00 2001 From: Tahg Date: Fri, 30 Sep 2011 03:28:23 -0400 Subject: [PATCH] hopeful fix for blocks not being pistons when they should be --- src/main/java/net/minecraft/server/BlockPiston.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java index d8f68e9149..dd3dd4dec0 100644 --- a/src/main/java/net/minecraft/server/BlockPiston.java +++ b/src/main/java/net/minecraft/server/BlockPiston.java @@ -3,6 +3,8 @@ package net.minecraft.server; import java.util.ArrayList; // CraftBukkit start +import org.bukkit.block.BlockFace; +import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.event.block.BlockPistonRetractEvent; import org.bukkit.event.block.BlockPistonExtendEvent; // CraftBukkit end @@ -66,7 +68,7 @@ public class BlockPiston extends Block { if (length >= 0) { org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k); - BlockPistonExtendEvent event = new BlockPistonExtendEvent(block, length); + BlockPistonExtendEvent event = new BlockPistonExtendEvent(block, length, CraftBlock.notchToBlockFace(i1)); world.getServer().getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -81,7 +83,7 @@ public class BlockPiston extends Block { // CraftBukkit start org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k); - BlockPistonRetractEvent event = new BlockPistonRetractEvent(block); + BlockPistonRetractEvent event = new BlockPistonRetractEvent(block, CraftBlock.notchToBlockFace(i1)); world.getServer().getPluginManager().callEvent(event); if (event.isCancelled()) {