Package net.mcft.copy.betterstorage.api.stand

Examples of net.mcft.copy.betterstorage.api.stand.ArmorStandEquipHandler


      for (int i = 0; i < items.tagCount(); i++) {
        NBTTagCompound item = items.getCompoundTagAt(i);
        int slot = item.getByte("Slot") & 255;
        if ((slot < 0) || (slot >= EnumArmorStandRegion.values().length)) continue;
        EnumArmorStandRegion region = EnumArmorStandRegion.values()[slot];
        ArmorStandEquipHandler handler = BetterStorageArmorStand.getEquipHandler(
            region, VanillaArmorStandEquipHandler.ID);
        if (handler != null)
          setItem(handler, ItemStack.loadItemStackFromNBT(item));
      }
     
    } else {
     
      NBTTagCompound items = (NBTTagCompound)itemsTag;
      for (EnumArmorStandRegion region : EnumArmorStandRegion.values()) {
        NBTTagCompound regionItems = items.getCompoundTag(region.toString());
        for (String id : (Set<String>)regionItems.func_150296_c()) {
          ItemStack item = ItemStack.loadItemStackFromNBT(regionItems.getCompoundTag(id));
          ArmorStandEquipHandler handler = BetterStorageArmorStand.getEquipHandler(region, id);
          setItem(handler, item);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of net.mcft.copy.betterstorage.api.stand.ArmorStandEquipHandler

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.