Examples of TileEntityLockableDoor


Examples of net.mcft.copy.betterstorage.tile.entity.TileEntityLockableDoor

 
  @Override
  public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
    int metadata = world.getBlockMetadata(x, y, z);
    float offset = metadata == 0 ? 0F : -1F;
    TileEntityLockableDoor te = WorldUtils.get(world, x, y + (int)offset, z, TileEntityLockableDoor.class);
   
    if (te == null) return;
   
    switch (te.orientation) {
    case WEST:
View Full Code Here

Examples of net.mcft.copy.betterstorage.tile.entity.TileEntityLockableDoor

  @Override
  public IIcon getIcon(IBlockAccess world, int x, int y, int z, int face) {
    int meta = world.getBlockMetadata(x, y, z);
    if (meta > 0) y -= 1;
    TileEntityLockableDoor lockable = WorldUtils.get(world, x, y, z, TileEntityLockableDoor.class);
   
    boolean flip = false;
    IIcon icon = iconUpper;
   
    if(meta == 0 || face == 1) {
View Full Code Here

Examples of net.mcft.copy.betterstorage.tile.entity.TileEntityLockableDoor

  }

  @Override
  public float getBlockHardness(World world, int x, int y, int z) {
    if (world.getBlockMetadata(x, y, z) > 0) y -= 1;
    TileEntityLockableDoor lockable = WorldUtils.get(world, x, y, z, TileEntityLockableDoor.class);
    if ((lockable != null) && (lockable.getLock() != null)) return -1;
    else return super.getBlockHardness(world, x, y, z);
  }
View Full Code Here

Examples of net.mcft.copy.betterstorage.tile.entity.TileEntityLockableDoor

 
  @Override
  public float getExplosionResistance(Entity entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) {
    if (world.getBlockMetadata(x, y, z) > 0) y -= 1;
    float modifier = 1.0F;
    TileEntityLockableDoor lockable = WorldUtils.get(world, x, y, z, TileEntityLockableDoor.class);
    if (lockable != null) {
      int persistance = BetterStorageEnchantment.getLevel(lockable.getLock(), "persistance");
      if (persistance > 0) modifier += Math.pow(2, persistance);
    }
    return super.getExplosionResistance(entity) * modifier;
  }
 
View Full Code Here

Examples of net.mcft.copy.betterstorage.tile.entity.TileEntityLockableDoor

  }

  @Override
  public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
    if (world.getBlockMetadata(x, y, z) > 0) y -= 1;
    TileEntityLockableDoor te = WorldUtils.get(world, x, y, z, TileEntityLockableDoor.class);
    return te.onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ);
  }
View Full Code Here

Examples of net.mcft.copy.betterstorage.tile.entity.TileEntityLockableDoor

  }
 
  @Override
  public void onBlockPreDestroy(World world, int x, int y, int z, int meta) {
    if(meta == 0) {
      TileEntityLockableDoor te = WorldUtils.get(world, x, y, z, TileEntityLockableDoor.class);
      WorldUtils.dropStackFromBlock(te, te.getLock());
      te.setLockWithUpdate(null);
    }
    super.onBlockPreDestroy(world, x, y, z, meta);
  }
View Full Code Here

Examples of net.mcft.copy.betterstorage.tile.entity.TileEntityLockableDoor

  public boolean canProvidePower() { return true; }
 
  @Override
  public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) {
    if (world.getBlockMetadata(x, y, z) > 0) y -= 1;
    TileEntityLockableDoor te = WorldUtils.get(world, x, y, z, TileEntityLockableDoor.class);
    return te == null ? 0 : (te.isPowered() ? 15 : 0);
  }
View Full Code Here

Examples of net.mcft.copy.betterstorage.tile.entity.TileEntityLockableDoor

    WorldUtils.get(world, x, y, z, TileEntityLockableDoor.class).setPowered(false);
  }
 
  @Override
  public TileEntity createTileEntity(World world, int metadata) {
    return ((metadata == 0) ? new TileEntityLockableDoor() : null);
  }
View Full Code Here

Examples of net.mcft.copy.betterstorage.tile.entity.TileEntityLockableDoor

            ForgeDirection.EAST) : orientation;
       
        world.setBlock(x, y, z, BetterStorageTiles.lockableDoor, 0, SetBlockFlag.SEND_TO_CLIENT);
        world.setBlock(x, y + 1, z, BetterStorageTiles.lockableDoor, 8, SetBlockFlag.SEND_TO_CLIENT);
     
        TileEntityLockableDoor te = WorldUtils.get(world, x, y, z, TileEntityLockableDoor.class);
        te.orientation = orientation;
        te.isOpen = isMirrored;
        te.isMirrored = isMirrored;
        te.setLock(holding);
       
        player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
      }
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.