Package buildcraft.api.events

Examples of buildcraft.api.events.BlockInteractionEvent


  }

  @Override
  public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xOffset, float yOffset, float zOffset) {
    super.onBlockActivated(world, x, y, z, player, side, xOffset, yOffset, zOffset);
    BlockInteractionEvent event = new BlockInteractionEvent(player, this);
    FMLCommonHandler.instance().bus().post(event);
    if (event.isCanceled()) {
      return true;
    }

    world.notifyBlocksOfNeighborChange(x, y, z, BuildCraftTransport.genericPipeBlock);
View Full Code Here


  @Override
  public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7,
      float par8, float par9) {

    BlockInteractionEvent event = new BlockInteractionEvent(entityplayer, this);
    FMLCommonHandler.instance().bus().post(event);
    if (event.isCanceled()) {
      return false;
    }

    if (!world.isRemote) {
      entityplayer.openGui(BuildCraftBuilders.instance, GuiIds.MAP,
View Full Code Here

  }

  @Override
  public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7, float par8, float par9) {
    super.onBlockActivated(world, i, j, k, entityplayer, par6, par7, par8, par9);
    BlockInteractionEvent event = new BlockInteractionEvent(entityplayer, this);
    FMLCommonHandler.instance().bus().post(event);
    if (event.isCanceled()) {
      return false;
    }

    // Drop through if the player is sneaking
    if (entityplayer.isSneaking()) {
View Full Code Here

  @Override
  public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7,
      float par8, float par9) {

    BlockInteractionEvent event = new BlockInteractionEvent(entityplayer, this);
    FMLCommonHandler.instance().bus().post(event);
    if (event.isCanceled()) {
      return false;
    }

    if (!world.isRemote) {
      entityplayer.openGui(BuildCraftBuilders.instance, GuiIds.REQUESTER,
View Full Code Here

  public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityplayer,
      int par6, float par7, float par8, float par9) {

    super.onBlockActivated(world, x, y, z, entityplayer, par6, par7, par8, par9);
   
    BlockInteractionEvent event = new BlockInteractionEvent(entityplayer, this);
    FMLCommonHandler.instance().bus().post(event);
    if (event.isCanceled()) {
      return false;
    }

    if (entityplayer.isSneaking()) {
      return false;
View Full Code Here

    // Drop through if the player is sneaking
    if (entityplayer.isSneaking()) {
      return false;
    }

    BlockInteractionEvent event = new BlockInteractionEvent(entityplayer, this, world.getBlockMetadata(i, j, k));
    FMLCommonHandler.instance().bus().post(event);
    if (event.isCanceled()) {
      return false;
    }

    if (!world.isRemote) {
      int meta = world.getBlockMetadata(i, j, k);
View Full Code Here

    // Drop through if the player is sneaking
//    if (player.isSneaking()) {
//      return false;
//    }

    BlockInteractionEvent event = new BlockInteractionEvent(player, this, world.getBlockMetadata(i, j, k));
    FMLCommonHandler.instance().bus().post(event);
    if (event.isCanceled()) {
      return false;
    }

    // Do not open guis when having a pipe in hand
    if (player.getCurrentEquippedItem() != null) {
View Full Code Here

    // Drop through if the player is sneaking
    if (entityplayer.isSneaking()) {
      return false;
    }

    BlockInteractionEvent event = new BlockInteractionEvent(entityplayer, this);
    FMLCommonHandler.instance().bus().post(event);
    if (event.isCanceled()) {
      return false;
    }

    Item equipped = entityplayer.getCurrentEquippedItem() != null ? entityplayer.getCurrentEquippedItem().getItem() : null;
    if (equipped instanceof IToolWrench && ((IToolWrench) equipped).canWrench(entityplayer, x, y, z)) {
View Full Code Here

    // Drop through if the player is sneaking
    if (entityplayer.isSneaking()) {
      return false;
    }

    BlockInteractionEvent event = new BlockInteractionEvent(entityplayer, this);
    FMLCommonHandler.instance().bus().post(event);
    if (event.isCanceled()) {
      return false;
    }

    if (!world.isRemote) {
      entityplayer.openGui(BuildCraftBuilders.instance, GuiIds.FILLER, world, i, j, k);
View Full Code Here

  @Override
  public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityplayer, int par6, float par7,
      float par8, float par9) {
    super.onBlockActivated(world, x, y, z, entityplayer, par6, par7, par8, par9);

    BlockInteractionEvent event = new BlockInteractionEvent(entityplayer, this);
    FMLCommonHandler.instance().bus().post(event);
    if (event.isCanceled()) {
      return false;
    }

    TileConstructionMarker marker = (TileConstructionMarker) world.getTileEntity(x, y, z);
View Full Code Here

TOP

Related Classes of buildcraft.api.events.BlockInteractionEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.