fix robot event

This commit is contained in:
AEnterprise 2014-09-20 11:52:18 +02:00
parent 8d6dc8c29b
commit 84c6b57ae5

View file

@ -794,9 +794,9 @@ public class BlockGenericPipe extends BlockBuildCraft {
if (((ItemRobot) currentItem.getItem()).getRobotNBT(currentItem) == null) {
return true;
}
RobotPlacementEvent event = new RobotPlacementEvent(player, ((NBTTagCompound) currentItem.stackTagCompound.getTag("board")).getString("id"));
FMLCommonHandler.instance().bus().post(event);
if (event.isCanceled()) {
RobotPlacementEvent robotEvent = new RobotPlacementEvent(player, ((NBTTagCompound) currentItem.stackTagCompound.getTag("board")).getString("id"));
FMLCommonHandler.instance().bus().post(robotEvent);
if (robotEvent.isCanceled()) {
return true;
}
EntityRobot robot = ((ItemRobot) currentItem.getItem())