use of riskyken.armourersWorkshop.common.skin.ExPropsPlayerSkinData in project Armourers-Workshop by RiskyKen.
the class MessageClientSkinWardrobeUpdate method onMessage.
@Override
public IMessage onMessage(MessageClientSkinWardrobeUpdate message, MessageContext ctx) {
ExPropsPlayerSkinData customEquipmentData = ExPropsPlayerSkinData.get(ctx.getServerHandler().playerEntity);
customEquipmentData.setSkinInfo(message.equipmentWardrobeData, true);
return null;
}
use of riskyken.armourersWorkshop.common.skin.ExPropsPlayerSkinData in project Armourers-Workshop by RiskyKen.
the class ItemSkinUnlock method onItemRightClick.
@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {
if (world.isRemote) {
return itemStack;
}
ISkinType skinType = getSkinTypeFormStack(itemStack);
ExPropsPlayerSkinData equipmentData = ExPropsPlayerSkinData.get(player);
int count = equipmentData.getEquipmentWardrobeData().getUnlockedSlotsForSkinType(skinType);
count++;
String localizedSkinName = SkinTypeRegistry.INSTANCE.getLocalizedSkinTypeName(skinType);
if (count <= ExPropsPlayerSkinData.MAX_SLOTS_PER_SKIN_TYPE) {
equipmentData.setSkinColumnCount(skinType, count);
player.addChatComponentMessage(new ChatComponentTranslation("chat.armourersworkshop:slotUnlocked", localizedSkinName.toLowerCase(), Integer.toString(count)));
itemStack.stackSize--;
} else {
player.addChatComponentMessage(new ChatComponentTranslation("chat.armourersworkshop:slotUnlockedFailed", localizedSkinName));
}
return itemStack;
}
use of riskyken.armourersWorkshop.common.skin.ExPropsPlayerSkinData in project Armourers-Workshop by RiskyKen.
the class SkinDataHandler method isArmourRenderOverridden.
@Override
public boolean isArmourRenderOverridden(EntityPlayer player, int slotId) {
ExPropsPlayerSkinData entityProps = ExPropsPlayerSkinData.get(player);
BitSet armourOverride = entityProps.getArmourOverride();
if (slotId < 4 & slotId >= 0) {
return armourOverride.get(slotId);
}
return false;
}
use of riskyken.armourersWorkshop.common.skin.ExPropsPlayerSkinData in project Armourers-Workshop by RiskyKen.
the class SkinDataHandler method removeSkinFromPlayer.
@Override
public void removeSkinFromPlayer(EntityPlayer player, ISkinType skinType, int index) {
ExPropsPlayerSkinData entityProps = getExtendedPropsPlayerForPlayer(player);
entityProps.clearEquipmentStack(skinType, index);
}
use of riskyken.armourersWorkshop.common.skin.ExPropsPlayerSkinData in project Armourers-Workshop by RiskyKen.
the class SkinDataHandler method setSkinOnPlayer.
@Override
public void setSkinOnPlayer(EntityPlayer player, ItemStack stack, int index) {
ExPropsPlayerSkinData entityProps = getExtendedPropsPlayerForPlayer(player);
entityProps.setEquipmentStack(stack, index);
}
Aggregations