Search in sources :

Example 1 with WardrobeInventory

use of riskyken.armourersWorkshop.common.inventory.WardrobeInventory in project Armourers-Workshop by RiskyKen.

the class ExPropsPlayerSkinData method clearAllEquipmentStacks.

public void clearAllEquipmentStacks() {
    ArrayList<ISkinType> skinList = SkinTypeRegistry.INSTANCE.getRegisteredSkinTypes();
    for (int i = 0; i < skinList.size(); i++) {
        ISkinType skinType = skinList.get(i);
        WardrobeInventory wi = wardrobeInventoryContainer.getInventoryForSkinType(skinType);
        if (wi != null) {
            for (int j = 0; j < wi.getSizeInventory(); j++) {
                wi.setInventorySlotContents(j, null);
            }
        }
    }
}
Also used : ISkinType(riskyken.armourersWorkshop.api.common.skin.type.ISkinType) TargetPoint(cpw.mods.fml.common.network.NetworkRegistry.TargetPoint) WardrobeInventory(riskyken.armourersWorkshop.common.inventory.WardrobeInventory)

Example 2 with WardrobeInventory

use of riskyken.armourersWorkshop.common.inventory.WardrobeInventory in project Armourers-Workshop by RiskyKen.

the class ExPropsPlayerSkinData method loadNBTData.

@Override
public void loadNBTData(NBTTagCompound compound) {
    wardrobeInventoryContainer.readFromNBT(compound);
    equipmentWardrobeData.loadNBTData(compound);
    allowNetworkUpdates = false;
    for (int i = 0; i < validSkins.length; i++) {
        WardrobeInventory wi = wardrobeInventoryContainer.getInventoryForSkinType(validSkins[i]);
        if (wi != null) {
            for (int j = 0; j < wi.getSizeInventory(); j++) {
                armourSlotUpdate(wi, (byte) j);
            }
        }
    }
    allowNetworkUpdates = true;
    if (compound.hasKey(TAG_LAST_XMAS_YEAR)) {
        this.lastXmasYear = compound.getInteger(TAG_LAST_XMAS_YEAR);
    } else {
        this.lastXmasYear = 0;
    }
}
Also used : TargetPoint(cpw.mods.fml.common.network.NetworkRegistry.TargetPoint) WardrobeInventory(riskyken.armourersWorkshop.common.inventory.WardrobeInventory)

Aggregations

TargetPoint (cpw.mods.fml.common.network.NetworkRegistry.TargetPoint)2 WardrobeInventory (riskyken.armourersWorkshop.common.inventory.WardrobeInventory)2 ISkinType (riskyken.armourersWorkshop.api.common.skin.type.ISkinType)1