use of riskyken.armourersWorkshop.common.skin.EntityEquipmentData in project Armourers-Workshop by RiskyKen.
the class SkinModelRenderer method getPlayerCustomArmour.
public Skin getPlayerCustomArmour(Entity entity, ISkinType skinType, int slotIndex) {
if (!(entity instanceof AbstractClientPlayer)) {
return null;
}
AbstractClientPlayer player = (AbstractClientPlayer) entity;
EntityEquipmentData equipmentData = playerEquipmentMap.get(new PlayerPointer(player));
// Look for skinned armourer.
if (skinType.getVanillaArmourSlotId() >= 0 && skinType.getVanillaArmourSlotId() < 4 && slotIndex == 0) {
int slot = 3 - skinType.getVanillaArmourSlotId();
ItemStack armourStack = player.getCurrentArmor(slot);
if (SkinNBTHelper.stackHasSkinData(armourStack)) {
SkinPointer sp = SkinNBTHelper.getSkinPointerFromStack(armourStack);
return getCustomArmourItemData(sp);
}
}
// No skinned armour found checking the equipment wardrobe.
if (equipmentData == null) {
return null;
}
if (!equipmentData.haveEquipment(skinType, slotIndex)) {
return null;
}
ISkinPointer skinPointer = equipmentData.getSkinPointer(skinType, slotIndex);
return getCustomArmourItemData(skinPointer);
}
use of riskyken.armourersWorkshop.common.skin.EntityEquipmentData in project Armourers-Workshop by RiskyKen.
the class SkinModelRenderer method getPlayerCustomEquipmentData.
public IEntityEquipment getPlayerCustomEquipmentData(Entity entity) {
if (!(entity instanceof AbstractClientPlayer)) {
return null;
}
AbstractClientPlayer player = (AbstractClientPlayer) entity;
EntityEquipmentData equipmentData = playerEquipmentMap.get(new PlayerPointer(player));
return equipmentData;
}
use of riskyken.armourersWorkshop.common.skin.EntityEquipmentData in project Armourers-Workshop by RiskyKen.
the class SkinModelRenderer method getPlayerDyeData.
public ISkinDye getPlayerDyeData(Entity entity, ISkinType skinType, int slotIndex) {
if (!(entity instanceof AbstractClientPlayer)) {
return null;
}
AbstractClientPlayer player = (AbstractClientPlayer) entity;
EntityEquipmentData equipmentData = playerEquipmentMap.get(new PlayerPointer(player));
// Look for skinned armourer.
if (skinType.getVanillaArmourSlotId() >= 0 && skinType.getVanillaArmourSlotId() < 4 && slotIndex == 0) {
int slot = 3 - skinType.getVanillaArmourSlotId();
ItemStack armourStack = player.getCurrentArmor(slot);
if (SkinNBTHelper.stackHasSkinData(armourStack)) {
SkinPointer sp = SkinNBTHelper.getSkinPointerFromStack(armourStack);
return sp.getSkinDye();
}
}
// No skinned armour found checking the equipment wardrobe.
if (equipmentData == null) {
return null;
}
if (!equipmentData.haveEquipment(skinType, slotIndex)) {
return null;
}
ISkinDye skinDye = equipmentData.getSkinPointer(skinType, slotIndex).getSkinDye();
return skinDye;
}
use of riskyken.armourersWorkshop.common.skin.EntityEquipmentData in project Armourers-Workshop by RiskyKen.
the class SkinModelRenderer method getPlayerExtraColours.
public byte[] getPlayerExtraColours(Entity entity) {
if (!(entity instanceof AbstractClientPlayer)) {
return null;
}
AbstractClientPlayer player = (AbstractClientPlayer) entity;
EntityEquipmentData equipmentData = playerEquipmentMap.get(new PlayerPointer(player));
return null;
}
Aggregations