Package buildcraft.api.events

Examples of buildcraft.api.events.BlockInteractionEvent


    // 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;
    }

    TileEntity tile = world.getTileEntity(x, y, z);
    TileBuilder builder = tile instanceof TileBuilder ? (TileBuilder) tile : 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;
    }

    TileEntity tile = world.getTileEntity(i, j, k);
    if (tile instanceof TileBlueprintLibrary) {
View Full Code Here

    if (!world.isRemote) {
      entityplayer.openGui(BuildCraftBuilders.instance, GuiIds.URBANIST,
          world, i, j, k);
    }

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

    return true;
View Full Code Here

    if (entityplayer.inventory.getCurrentItem() != null
        && entityplayer.inventory.getCurrentItem().getItem() instanceof ItemMapLocation) {
      return false;
    }

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

    TileEntity tile = world.getTileEntity(i, j, k);
    if (tile instanceof TileMarker) {
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 (entityplayer.getCurrentEquippedItem() != null) {
      if (entityplayer.getCurrentEquippedItem().getItem() instanceof IItemPipe) {
View Full Code Here

    TileEntity tile = world.getTileEntity(x, y, z);

    if (!(tile instanceof TileRefinery)) {
      return false;
    }
    BlockInteractionEvent event = new BlockInteractionEvent(player, this);
    FMLCommonHandler.instance().bus().post(event);
    if (event.isCanceled()) {
       return false;
    }

    ItemStack current = player.getCurrentEquippedItem();
    Item equipped = current != null ? current.getItem() : null;
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) {
    ItemStack current = entityplayer.inventory.getCurrentItem();

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

    if (current != null) {
      FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current);
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.