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);
}
}
}
}
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;
}
}
Aggregations