Package net.mcft.copy.betterstorage.tile.entity

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


  @Override
  public int quantityDropped(int meta, int fortune, Random random) { return (hasMaterial() ? 0 : 1); }
 
  @Override
  public float getBlockHardness(World world, int x, int y, int z) {
    TileEntityLockable lockable = WorldUtils.get(world, x, y, z, TileEntityLockable.class);
    if ((lockable != null) && (lockable.getLock() != null)) return -1;
    else return super.getBlockHardness(world, x, y, z);
  }
View Full Code Here


  }
 
  @Override
  public float getExplosionResistance(Entity entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) {
    float modifier = 1.0F;
    TileEntityLockable lockable = WorldUtils.get(world, x, y, z, TileEntityLockable.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

    damage = buffer.readBoolean();
  }
 
  @Override
  public void handle(EntityPlayer player) {
    TileEntityLockable lockable = WorldUtils.get(player.worldObj, x, y, z, TileEntityLockable.class);
    damage &= BetterStorage.globalConfig.getBoolean(GlobalConfig.lockBreakable);
    if (lockable != null)
      lockable.lockAttachment.hit(damage);
  }
View Full Code Here

TOP

Related Classes of net.mcft.copy.betterstorage.tile.entity.TileEntityLockable

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.