use of riskyken.armourersWorkshop.common.data.PlayerPointer in project Armourers-Workshop by RiskyKen.
the class EntityEquipmentDataManager method onStopTracking.
@SubscribeEvent
public void onStopTracking(PlayerEvent.StopTracking event) {
if (event.target instanceof EntityPlayerMP) {
EntityPlayerMP target = (EntityPlayerMP) event.target;
MessageServerPlayerLeftTrackingRange message = new MessageServerPlayerLeftTrackingRange(new PlayerPointer(target));
PacketHandler.networkWrapper.sendTo(message, (EntityPlayerMP) event.entityPlayer);
}
}
use of riskyken.armourersWorkshop.common.data.PlayerPointer in project Armourers-Workshop by RiskyKen.
the class ExPropsPlayerSkinData method checkAndSendCustomArmourDataTo.
private void checkAndSendCustomArmourDataTo(EntityPlayerMP targetPlayer) {
PlayerPointer playerPointer = new PlayerPointer(player);
PacketHandler.networkWrapper.sendTo(new MessageServerSkinInfoUpdate(playerPointer, equipmentData), targetPlayer);
}
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);
}
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);
}
use of riskyken.armourersWorkshop.common.data.PlayerPointer in project Armourers-Workshop by RiskyKen.
the class SkinModelRenderer method onRender.
@SubscribeEvent
public void onRender(RenderPlayerEvent.Pre event) {
EntityPlayer player = event.entityPlayer;
targetPlayer = player;
if (ClientProxy.getSkinRenderType() == SkinRenderType.MODEL_ATTACHMENT) {
attachModelsToBiped(event.renderer.modelBipedMain, event.renderer);
}
if (player.getGameProfile() == null) {
return;
}
PlayerPointer playerPointer = new PlayerPointer(player);
// A proper lady should not swing her legs around!
if (isPlayerWearingSkirt(playerPointer)) {
EquipmentWardrobeData ewd = ClientProxy.equipmentWardrobeHandler.getEquipmentWardrobeData(playerPointer);
if (ewd != null && ewd.limitLimbs) {
if (player.limbSwingAmount > 0.25F) {
player.limbSwingAmount = 0.25F;
player.prevLimbSwingAmount = 0.25F;
}
}
}
}
Aggregations