Package net.mcft.copy.betterstorage.tile.stand

Examples of net.mcft.copy.betterstorage.tile.stand.TileEntityArmorStand


  private AxisAlignedBB getArmorStandHighlightBox(EntityPlayer player, World world, int x, int y, int z, Vec3 hitVec) {
   
    int metadata = world.getBlockMetadata(x, y, z);
    if (metadata > 0) y -= 1;
   
    TileEntityArmorStand armorStand = WorldUtils.get(world, x, y, z, TileEntityArmorStand.class);
    if (armorStand == null) return null;
   
    int slot = Math.max(0, Math.min(3, (int)((hitVec.yCoord - y) * 2)));
   
    double minX = x + 2 / 16.0;
    double minY = y + slot / 2.0;
    double minZ = z + 2 / 16.0;
    double maxX = x + 14 / 16.0;
    double maxY = y + slot / 2.0 + 0.5;
    double maxZ = z + 14 / 16.0;
   
    EnumArmorStandRegion region = EnumArmorStandRegion.values()[slot];
    for (ArmorStandEquipHandler handler : BetterStorageArmorStand.getEquipHandlers(region)) {
      ItemStack item = armorStand.getItem(handler);
      if (player.isSneaking()) {
        // Check if we can swap the player's equipped armor with armor stand's.
        ItemStack equipped = handler.getEquipment(player);
        if (((item == null) && (equipped == null)) ||
            ((item != null) && !handler.isValidItem(player, item)) ||
View Full Code Here

TOP

Related Classes of net.mcft.copy.betterstorage.tile.stand.TileEntityArmorStand

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.