Search in sources :

Example 11 with PlayerPointer

use of riskyken.armourersWorkshop.common.data.PlayerPointer in project Armourers-Workshop by RiskyKen.

the class ExPropsPlayerSkinData method sendNakedData.

private void sendNakedData(EntityPlayerMP targetPlayer) {
    PlayerPointer playerPointer = new PlayerPointer(player);
    PacketHandler.networkWrapper.sendTo(new MessageServerSkinWardrobeUpdate(playerPointer, this.equipmentWardrobeData), targetPlayer);
}
Also used : PlayerPointer(riskyken.armourersWorkshop.common.data.PlayerPointer) MessageServerSkinWardrobeUpdate(riskyken.armourersWorkshop.common.network.messages.server.MessageServerSkinWardrobeUpdate)

Example 12 with PlayerPointer

use of riskyken.armourersWorkshop.common.data.PlayerPointer in project Armourers-Workshop by RiskyKen.

the class ExPropsPlayerSkinData method updateEquipmentDataToPlayersAround.

public void updateEquipmentDataToPlayersAround() {
    if (!allowNetworkUpdates) {
        return;
    }
    TargetPoint p = new TargetPoint(player.dimension, player.posX, player.posY, player.posZ, 512);
    PlayerPointer playerPointer = new PlayerPointer(player);
    PacketHandler.networkWrapper.sendToAllAround(new MessageServerSkinInfoUpdate(playerPointer, equipmentData), p);
}
Also used : PlayerPointer(riskyken.armourersWorkshop.common.data.PlayerPointer) MessageServerSkinInfoUpdate(riskyken.armourersWorkshop.common.network.messages.server.MessageServerSkinInfoUpdate) TargetPoint(cpw.mods.fml.common.network.NetworkRegistry.TargetPoint)

Example 13 with PlayerPointer

use of riskyken.armourersWorkshop.common.data.PlayerPointer in project Armourers-Workshop by RiskyKen.

the class ExPropsPlayerSkinData method sendSkinData.

private void sendSkinData() {
    TargetPoint p = new TargetPoint(player.dimension, player.posX, player.posY, player.posZ, 512);
    PlayerPointer playerPointer = new PlayerPointer(player);
    PacketHandler.networkWrapper.sendToAllAround(new MessageServerSkinWardrobeUpdate(playerPointer, this.equipmentWardrobeData), p);
}
Also used : PlayerPointer(riskyken.armourersWorkshop.common.data.PlayerPointer) MessageServerSkinWardrobeUpdate(riskyken.armourersWorkshop.common.network.messages.server.MessageServerSkinWardrobeUpdate) TargetPoint(cpw.mods.fml.common.network.NetworkRegistry.TargetPoint)

Example 14 with PlayerPointer

use of riskyken.armourersWorkshop.common.data.PlayerPointer in project Armourers-Workshop by RiskyKen.

the class MessageServerSkinWardrobeUpdate method fromBytes.

@Override
public void fromBytes(ByteBuf buf) {
    this.playerPointer = new PlayerPointer(buf);
    this.equipmentWardrobeData.fromBytes(buf);
}
Also used : PlayerPointer(riskyken.armourersWorkshop.common.data.PlayerPointer)

Example 15 with PlayerPointer

use of riskyken.armourersWorkshop.common.data.PlayerPointer in project Armourers-Workshop by RiskyKen.

the class PaintingHelper method getLocalPlayersSkinColour.

@SideOnly(Side.CLIENT)
public static int getLocalPlayersSkinColour() {
    PlayerPointer playerPointer = new PlayerPointer(Minecraft.getMinecraft().thePlayer);
    EquipmentWardrobeData ewd = ClientProxy.equipmentWardrobeHandler.getEquipmentWardrobeData(playerPointer);
    if (ewd != null) {
        return ewd.skinColour;
    }
    return Color.decode("#F9DFD2").getRGB();
}
Also used : PlayerPointer(riskyken.armourersWorkshop.common.data.PlayerPointer) EquipmentWardrobeData(riskyken.armourersWorkshop.common.skin.EquipmentWardrobeData) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

PlayerPointer (riskyken.armourersWorkshop.common.data.PlayerPointer)24 EquipmentWardrobeData (riskyken.armourersWorkshop.common.skin.EquipmentWardrobeData)11 SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)8 AbstractClientPlayer (net.minecraft.client.entity.AbstractClientPlayer)7 EntityPlayer (net.minecraft.entity.player.EntityPlayer)7 MannequinFakePlayer (riskyken.armourersWorkshop.client.render.MannequinFakePlayer)6 ISkinDye (riskyken.armourersWorkshop.api.common.skin.data.ISkinDye)4 EntityEquipmentData (riskyken.armourersWorkshop.common.skin.EntityEquipmentData)4 RenderPlayer (net.minecraft.client.renderer.entity.RenderPlayer)3 ItemStack (net.minecraft.item.ItemStack)3 FakePlayer (net.minecraftforge.common.util.FakePlayer)3 Skin (riskyken.armourersWorkshop.common.skin.data.Skin)3 TargetPoint (cpw.mods.fml.common.network.NetworkRegistry.TargetPoint)2 SideOnly (cpw.mods.fml.relauncher.SideOnly)2 Color (java.awt.Color)2 ResourceLocation (net.minecraft.util.ResourceLocation)2 ISkinPointer (riskyken.armourersWorkshop.api.common.skin.data.ISkinPointer)2 EntityTextureInfo (riskyken.armourersWorkshop.client.render.EntityTextureInfo)2 MessageServerSkinInfoUpdate (riskyken.armourersWorkshop.common.network.messages.server.MessageServerSkinInfoUpdate)2 MessageServerSkinWardrobeUpdate (riskyken.armourersWorkshop.common.network.messages.server.MessageServerSkinWardrobeUpdate)2