/** * Update FOV modifier hand */ private void updateFovModifierHand() { float f = 1.0F; if (this.mc.getRenderViewEntity() instanceof AbstractClientPlayer) { AbstractClientPlayer abstractclientplayer = (AbstractClientPlayer)this.mc.getRenderViewEntity(); f = abstractclientplayer.getFovModifier(); } this.fovModifierHandPrev = this.fovModifierHand; this.fovModifierHand += (f - this.fovModifierHand) * 0.5F; if (this.fovModifierHand > 1.5F) { this.fovModifierHand = 1.5F; } if (this.fovModifierHand < 0.1F) { this.fovModifierHand = 0.1F; } }
private static void renderExtra(float partialTicks) { AbstractClientPlayer abstractclientplayer = Minecraft.getMinecraft().player; float f = abstractclientplayer.getSwingProgress(partialTicks); EnumHand enumhand = (EnumHand) MoreObjects.firstNonNull(abstractclientplayer.swingingHand, EnumHand.MAIN_HAND); float f1 = abstractclientplayer.prevRotationPitch + (abstractclientplayer.rotationPitch - abstractclientplayer.prevRotationPitch) * partialTicks; float f2 = abstractclientplayer.prevRotationYaw + (abstractclientplayer.rotationYaw - abstractclientplayer.prevRotationYaw) * partialTicks; rotateArroundXAndY(f1, f2); setLightmap(); rotateArm(partialTicks); GlStateManager.enableRescaleNormal(); float f3 = enumhand == EnumHand.MAIN_HAND ? f : 0.0F; float f5 = 1.0F - (1F); renderArmsFirstPerson(f1, f5, f3); //float f4 = enumhand == EnumHand.OFF_HAND ? f : 0.0F; //float f6 = 1.0F - (0F); //renderArmsFirstPerson(f1, f6, f4); GlStateManager.disableRescaleNormal(); }
public static MobTypeEnum getRelationship(Entity entity) { if(entity instanceof AbstractClientPlayer) return MobTypeEnum.PLAYER; else { // check special cases first for (MobType type : MobTypeRegistry.getSortedSpecialMobTypes()) if (type.isMobType(entity)) return type.getMobType(entity); // this code will continue if no special was found if(MobTypeRegistry.HOSTILE.isMobType(entity)) return MobTypeEnum.HOSTILE; else if(MobTypeRegistry.FRIENDLY.isMobType(entity)) return MobTypeEnum.FRIENDLY; else return MobTypeEnum.HOSTILE; // default to hostile } }
public void doRenderLayer(AbstractClientPlayer entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale) { if (entitylivingbaseIn.getName().equals("deadmau5") && entitylivingbaseIn.hasSkin() && !entitylivingbaseIn.isInvisible()) { this.playerRenderer.bindTexture(entitylivingbaseIn.getLocationSkin()); for (int i = 0; i < 2; ++i) { float f = entitylivingbaseIn.prevRotationYaw + (entitylivingbaseIn.rotationYaw - entitylivingbaseIn.prevRotationYaw) * partialTicks - (entitylivingbaseIn.prevRenderYawOffset + (entitylivingbaseIn.renderYawOffset - entitylivingbaseIn.prevRenderYawOffset) * partialTicks); float f1 = entitylivingbaseIn.prevRotationPitch + (entitylivingbaseIn.rotationPitch - entitylivingbaseIn.prevRotationPitch) * partialTicks; GlStateManager.pushMatrix(); GlStateManager.rotate(f, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(f1, 1.0F, 0.0F, 0.0F); GlStateManager.translate(0.375F * (float)(i * 2 - 1), 0.0F, 0.0F); GlStateManager.translate(0.0F, -0.375F, 0.0F); GlStateManager.rotate(-f1, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(-f, 0.0F, 1.0F, 0.0F); float f2 = 1.3333334F; GlStateManager.scale(f2, f2, f2); this.playerRenderer.getMainModel().renderDeadmau5Head(0.0625F); GlStateManager.popMatrix(); } } }
/** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doe */ public void doRender(AbstractClientPlayer entity, double x, double y, double z, float entityYaw, float partialTicks) { if (!entity.isUser() || this.renderManager.livingPlayer == entity) { double d0 = y; if (entity.isSneaking() && !(entity instanceof EntityPlayerSP)) { d0 = y - 0.125D; } this.setModelVisibilities(entity); super.doRender(entity, x, d0, z, entityYaw, partialTicks); } }
private void func_178095_a(AbstractClientPlayer clientPlayer, float p_178095_2_, float p_178095_3_) { float f = -0.3F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI); float f1 = 0.4F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI * 2.0F); float f2 = -0.4F * MathHelper.sin(p_178095_3_ * (float)Math.PI); GlStateManager.translate(f, f1, f2); GlStateManager.translate(0.64000005F, -0.6F, -0.71999997F); GlStateManager.translate(0.0F, p_178095_2_ * -0.6F, 0.0F); GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F); float f3 = MathHelper.sin(p_178095_3_ * p_178095_3_ * (float)Math.PI); float f4 = MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI); GlStateManager.rotate(f4 * 70.0F, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(f3 * -20.0F, 0.0F, 0.0F, 1.0F); this.mc.getTextureManager().bindTexture(clientPlayer.getLocationSkin()); GlStateManager.translate(-1.0F, 3.6F, 3.5F); GlStateManager.rotate(120.0F, 0.0F, 0.0F, 1.0F); GlStateManager.rotate(200.0F, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(-135.0F, 0.0F, 1.0F, 0.0F); GlStateManager.scale(1.0F, 1.0F, 1.0F); GlStateManager.translate(5.6F, 0.0F, 0.0F); Render<AbstractClientPlayer> render = this.renderManager.<AbstractClientPlayer>getEntityRenderObject(this.mc.thePlayer); GlStateManager.disableCull(); RenderPlayer renderplayer = (RenderPlayer)render; renderplayer.renderRightArm(this.mc.thePlayer); GlStateManager.enableCull(); }
private void func_178098_a(float p_178098_1_, AbstractClientPlayer clientPlayer) { GlStateManager.rotate(-18.0F, 0.0F, 0.0F, 1.0F); GlStateManager.rotate(-12.0F, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(-8.0F, 1.0F, 0.0F, 0.0F); GlStateManager.translate(-0.9F, 0.2F, 0.0F); float f = (float)this.itemToRender.getMaxItemUseDuration() - ((float)clientPlayer.getItemInUseCount() - p_178098_1_ + 1.0F); float f1 = f / 20.0F; f1 = (f1 * f1 + f1 * 2.0F) / 3.0F; if (f1 > 1.0F) { f1 = 1.0F; } if (f1 > 0.1F) { float f2 = MathHelper.sin((f - 0.1F) * 1.3F); float f3 = f1 - 0.1F; float f4 = f2 * f3; GlStateManager.translate(f4 * 0.0F, f4 * 0.01F, f4 * 0.0F); } GlStateManager.translate(f1 * 0.0F, f1 * 0.0F, f1 * 0.1F); GlStateManager.scale(1.0F, 1.0F, 1.0F + f1 * 0.2F); }
public TeamSelectionObject(ScorePlayerTeam p_i45492_2_) { this.field_178676_b = p_i45492_2_; this.field_178675_d = Lists.<NetworkPlayerInfo>newArrayList(); for (String s : p_i45492_2_.getMembershipCollection()) { NetworkPlayerInfo networkplayerinfo = Minecraft.getMinecraft().getNetHandler().getPlayerInfo(s); if (networkplayerinfo != null) { this.field_178675_d.add(networkplayerinfo); } } if (!this.field_178675_d.isEmpty()) { String s1 = ((NetworkPlayerInfo)this.field_178675_d.get((new Random()).nextInt(this.field_178675_d.size()))).getGameProfile().getName(); this.field_178677_c = AbstractClientPlayer.getLocationSkin(s1); AbstractClientPlayer.getDownloadImageSkin(this.field_178677_c, s1); } else { this.field_178677_c = DefaultPlayerSkin.getDefaultSkinLegacy(); } }
public static synchronized PlayerConfiguration getPlayerConfiguration(AbstractClientPlayer p_getPlayerConfiguration_0_) { String s = p_getPlayerConfiguration_0_.getNameClear(); if (s == null) { return null; } else { PlayerConfiguration playerconfiguration = (PlayerConfiguration)getMapConfigurations().get(s); if (playerconfiguration == null) { playerconfiguration = new PlayerConfiguration(); getMapConfigurations().put(s, playerconfiguration); PlayerConfigurationReceiver playerconfigurationreceiver = new PlayerConfigurationReceiver(s); String s1 = "http://s.optifine.net/users/" + s + ".cfg"; FileDownloadThread filedownloadthread = new FileDownloadThread(s1, playerconfigurationreceiver); filedownloadthread.start(); } return playerconfiguration; } }
public void renderLeftArm(AbstractClientPlayer clientPlayer) { float f = 1.0F; GlStateManager.color(1.0F, 1.0F, 1.0F); float f1 = 0.0625F; ModelPlayer modelplayer = this.getMainModel(); this.setModelVisibilities(clientPlayer); GlStateManager.enableBlend(); modelplayer.isSneak = false; modelplayer.swingProgress = 0.0F; modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer); modelplayer.bipedLeftArm.rotateAngleX = 0.0F; modelplayer.bipedLeftArm.render(0.0625F); modelplayer.bipedLeftArmwear.rotateAngleX = 0.0F; modelplayer.bipedLeftArmwear.render(0.0625F); GlStateManager.disableBlend(); }
public TeamSelectionObject(ScorePlayerTeam p_i45492_2_) { this.team = p_i45492_2_; this.players = Lists.<NetworkPlayerInfo>newArrayList(); for (String s : p_i45492_2_.getMembershipCollection()) { NetworkPlayerInfo networkplayerinfo = Minecraft.getMinecraft().getConnection().getPlayerInfo(s); if (networkplayerinfo != null) { this.players.add(networkplayerinfo); } } if (this.players.isEmpty()) { this.location = DefaultPlayerSkin.getDefaultSkinLegacy(); } else { String s1 = ((NetworkPlayerInfo)this.players.get((new Random()).nextInt(this.players.size()))).getGameProfile().getName(); this.location = AbstractClientPlayer.getLocationSkin(s1); AbstractClientPlayer.getDownloadImageSkin(this.location, s1); } }
protected void renderOffsetLivingLabel(AbstractClientPlayer entityIn, double x, double y, double z, String str, float p_177069_9_, double p_177069_10_) { if (p_177069_10_ < 100.0D) { Scoreboard scoreboard = entityIn.getWorldScoreboard(); ScoreObjective scoreobjective = scoreboard.getObjectiveInDisplaySlot(2); if (scoreobjective != null) { Score score = scoreboard.getValueFromObjective(entityIn.getName(), scoreobjective); this.renderLivingLabel(entityIn, score.getScorePoints() + " " + scoreobjective.getDisplayName(), x, y, z, 64); y += (double)((float)this.getFontRendererFromRenderManager().FONT_HEIGHT * 1.15F * p_177069_9_); } } super.renderOffsetLivingLabel(entityIn, x, y, z, str, p_177069_9_, p_177069_10_); }
protected void renderEntityName(AbstractClientPlayer entityIn, double x, double y, double z, String name, double distanceSq) { if (distanceSq < 100.0D) { Scoreboard scoreboard = entityIn.getWorldScoreboard(); ScoreObjective scoreobjective = scoreboard.getObjectiveInDisplaySlot(2); if (scoreobjective != null) { Score score = scoreboard.getOrCreateScore(entityIn.getName(), scoreobjective); this.renderLivingLabel(entityIn, score.getScorePoints() + " " + scoreobjective.getDisplayName(), x, y, z, 64); y += (double)((float)this.getFontRendererFromRenderManager().FONT_HEIGHT * 1.15F * 0.025F); } } super.renderEntityName(entityIn, x, y, z, name, distanceSq); }
private void func_178095_a(AbstractClientPlayer clientPlayer, float p_178095_2_, float p_178095_3_) { float f = -0.3F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI); float f1 = 0.4F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI * 2.0F); float f2 = -0.4F * MathHelper.sin(p_178095_3_ * (float)Math.PI); GlStateManager.translate(f, f1, f2); GlStateManager.translate(0.64000005F, -0.6F, -0.71999997F); GlStateManager.translate(0.0F, p_178095_2_ * -0.6F, 0.0F); GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F); float f3 = MathHelper.sin(p_178095_3_ * p_178095_3_ * (float)Math.PI); float f4 = MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI); GlStateManager.rotate(f4 * 70.0F, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(f3 * -20.0F, 0.0F, 0.0F, 1.0F); this.mc.getTextureManager().bindTexture(clientPlayer.getLocationSkin()); GlStateManager.translate(-1.0F, 3.6F, 3.5F); GlStateManager.rotate(120.0F, 0.0F, 0.0F, 1.0F); GlStateManager.rotate(200.0F, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(-135.0F, 0.0F, 1.0F, 0.0F); GlStateManager.scale(1.0F, 1.0F, 1.0F); GlStateManager.translate(5.6F, 0.0F, 0.0F); Render render = this.renderManager.getEntityRenderObject(this.mc.thePlayer); GlStateManager.disableCull(); RenderPlayer renderplayer = (RenderPlayer)render; renderplayer.renderRightArm(this.mc.thePlayer); GlStateManager.enableCull(); }
private void func_178104_a(AbstractClientPlayer clientPlayer, float p_178104_2_) { float f = (float)clientPlayer.getItemInUseCount() - p_178104_2_ + 1.0F; float f1 = f / (float)this.itemToRender.getMaxItemUseDuration(); float f2 = MathHelper.abs(MathHelper.cos(f / 4.0F * (float)Math.PI) * 0.1F); if (f1 >= 0.8F) { f2 = 0.0F; } GlStateManager.translate(0.0F, f2, 0.0F); float f3 = 1.0F - (float)Math.pow((double)f1, 27.0D); GlStateManager.translate(f3 * 0.6F, f3 * -0.5F, f3 * 0.0F); GlStateManager.rotate(f3 * 90.0F, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(f3 * 10.0F, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(f3 * 30.0F, 0.0F, 0.0F, 1.0F); }
public void renderRightArm(AbstractClientPlayer clientPlayer) { float f = 1.0F; GlStateManager.color(1.0F, 1.0F, 1.0F); float f1 = 0.0625F; ModelPlayer modelplayer = this.getMainModel(); this.setModelVisibilities(clientPlayer); GlStateManager.enableBlend(); modelplayer.swingProgress = 0.0F; modelplayer.isSneak = false; modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer); modelplayer.bipedRightArm.rotateAngleX = 0.0F; modelplayer.bipedRightArm.render(0.0625F); modelplayer.bipedRightArmwear.rotateAngleX = 0.0F; modelplayer.bipedRightArmwear.render(0.0625F); GlStateManager.disableBlend(); }
private void renderArm(EnumHandSide p_187455_1_) { this.mc.getTextureManager().bindTexture(this.mc.thePlayer.getLocationSkin()); Render<AbstractClientPlayer> render = this.renderManager.<AbstractClientPlayer>getEntityRenderObject(this.mc.thePlayer); RenderPlayer renderplayer = (RenderPlayer)render; GlStateManager.pushMatrix(); float f = p_187455_1_ == EnumHandSide.RIGHT ? 1.0F : -1.0F; GlStateManager.rotate(92.0F, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(45.0F, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(f * -41.0F, 0.0F, 0.0F, 1.0F); GlStateManager.translate(f * 0.3F, -1.1F, 0.45F); if (p_187455_1_ == EnumHandSide.RIGHT) { renderplayer.renderRightArm(this.mc.thePlayer); } else { renderplayer.renderLeftArm(this.mc.thePlayer); } GlStateManager.popMatrix(); }
/** * Update FOV modifier hand */ private void updateFovModifierHand() { float f = 1.0F; if (this.mc.getRenderViewEntity() instanceof AbstractClientPlayer) { AbstractClientPlayer abstractclientplayer = (AbstractClientPlayer) this.mc.getRenderViewEntity(); f = abstractclientplayer.getFovModifier(); } this.fovModifierHandPrev = this.fovModifierHand; this.fovModifierHand += (f - this.fovModifierHand) * 0.5F; if (this.fovModifierHand > 1.5F) { this.fovModifierHand = 1.5F; } if (this.fovModifierHand < 0.1F) { this.fovModifierHand = 0.1F; } }
@SubscribeEvent public static void onRenderPlayer(RenderPlayerEvent.Post event) { EntityPlayer player = event.getEntityPlayer(); String uuid = player.getUUID(player.getGameProfile()).toString(); if(player instanceof AbstractClientPlayer && UUIDS.contains(uuid) && !done.contains(player)) { AbstractClientPlayer clplayer = (AbstractClientPlayer) player; if(clplayer.hasPlayerInfo()) { NetworkPlayerInfo info = ReflectionHelper.getPrivateValue(AbstractClientPlayer.class, clplayer, ObfuscatedNames.PLAYER_INFO); Map<MinecraftProfileTexture.Type, ResourceLocation> textures = ReflectionHelper.getPrivateValue(NetworkPlayerInfo.class, info, ObfuscatedNames.PLAYER_TEXTURES); ResourceLocation loc = new ResourceLocation("proxyslib", "textures/whoknows/dev_cape.png"); textures.put(MinecraftProfileTexture.Type.CAPE, loc); textures.put(MinecraftProfileTexture.Type.ELYTRA, loc); done.add(player); } } }
@Inject(method = "renderItemInFirstPerson", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;getItemUseAction()Lnet/minecraft/item/EnumAction;"), locals = LocalCapture.CAPTURE_FAILEXCEPTION) private void loadCurrentPosition(float partialTicks, CallbackInfo callbackInfo, float f, AbstractClientPlayer abstractClientPlayer, float f1) { this.currentPosition = PastOption.OLD_BLOCKHIT.getValue() ? f1 : 0.0f; }
public static void bindFace(String p_bindFace_0_, String p_bindFace_1_) { ResourceLocation resourcelocation = AbstractClientPlayer.getLocationSkin(p_bindFace_1_); if (resourcelocation == null) { resourcelocation = DefaultPlayerSkin.getDefaultSkin(UUIDTypeAdapter.fromString(p_bindFace_0_)); } AbstractClientPlayer.getDownloadImageSkin(resourcelocation, p_bindFace_1_); Minecraft.getMinecraft().getTextureManager().bindTexture(resourcelocation); }
public static void drawAltFace(String name, int x, int y, int w, int h, boolean selected) { try { AbstractClientPlayer.getDownloadImageSkin(AbstractClientPlayer.getLocationSkin(name), name) .loadTexture(Minecraft.getMinecraft().getResourceManager()); Minecraft.getMinecraft().getTextureManager().bindTexture(AbstractClientPlayer.getLocationSkin(name)); glEnable(GL_BLEND); glColor4f(0.9F, 0.9F, 0.9F, 1.0F); Gui.drawModalRectWithCustomSizedTexture(x, y, 24, 24, w, h, 192, 192); Gui.drawModalRectWithCustomSizedTexture(x, y, 120, 24, w, h, 192, 192); glDisable(GL_BLEND); } catch (Exception e) { ; } }
private static void setLightmap() { AbstractClientPlayer abstractclientplayer = Minecraft.getMinecraft().player; int i = Minecraft.getMinecraft().world.getCombinedLight(new BlockPos(abstractclientplayer.posX, abstractclientplayer.posY + (double) abstractclientplayer.getEyeHeight(), abstractclientplayer.posZ), 0); float f = (float) (i & 65535); float f1 = (float) (i >> 16); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, f, f1); }
public void doRenderLayer(AbstractClientPlayer entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale) { if (entitylivingbaseIn.hasPlayerInfo() && !entitylivingbaseIn.isInvisible() && entitylivingbaseIn.isWearing(EnumPlayerModelParts.CAPE) && entitylivingbaseIn.getLocationCape() != null) { GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.playerRenderer.bindTexture(entitylivingbaseIn.getLocationCape()); GlStateManager.pushMatrix(); GlStateManager.translate(0.0F, 0.0F, 0.125F); double d0 = entitylivingbaseIn.prevChasingPosX + (entitylivingbaseIn.chasingPosX - entitylivingbaseIn.prevChasingPosX) * (double)partialTicks - (entitylivingbaseIn.prevPosX + (entitylivingbaseIn.posX - entitylivingbaseIn.prevPosX) * (double)partialTicks); double d1 = entitylivingbaseIn.prevChasingPosY + (entitylivingbaseIn.chasingPosY - entitylivingbaseIn.prevChasingPosY) * (double)partialTicks - (entitylivingbaseIn.prevPosY + (entitylivingbaseIn.posY - entitylivingbaseIn.prevPosY) * (double)partialTicks); double d2 = entitylivingbaseIn.prevChasingPosZ + (entitylivingbaseIn.chasingPosZ - entitylivingbaseIn.prevChasingPosZ) * (double)partialTicks - (entitylivingbaseIn.prevPosZ + (entitylivingbaseIn.posZ - entitylivingbaseIn.prevPosZ) * (double)partialTicks); float f = entitylivingbaseIn.prevRenderYawOffset + (entitylivingbaseIn.renderYawOffset - entitylivingbaseIn.prevRenderYawOffset) * partialTicks; double d3 = (double)MathHelper.sin(f * (float)Math.PI / 180.0F); double d4 = (double)(-MathHelper.cos(f * (float)Math.PI / 180.0F)); float f1 = (float)d1 * 10.0F; f1 = MathHelper.clamp_float(f1, -6.0F, 32.0F); float f2 = (float)(d0 * d3 + d2 * d4) * 100.0F; float f3 = (float)(d0 * d4 - d2 * d3) * 100.0F; if (f2 < 0.0F) { f2 = 0.0F; } float f4 = entitylivingbaseIn.prevCameraYaw + (entitylivingbaseIn.cameraYaw - entitylivingbaseIn.prevCameraYaw) * partialTicks; f1 = f1 + MathHelper.sin((entitylivingbaseIn.prevDistanceWalkedModified + (entitylivingbaseIn.distanceWalkedModified - entitylivingbaseIn.prevDistanceWalkedModified) * partialTicks) * 6.0F) * 32.0F * f4; if (entitylivingbaseIn.isSneaking()) { f1 += 25.0F; } GlStateManager.rotate(6.0F + f2 / 2.0F + f1, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(f3 / 2.0F, 0.0F, 0.0F, 1.0F); GlStateManager.rotate(-f3 / 2.0F, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F); this.playerRenderer.getMainModel().renderCape(0.0625F); GlStateManager.popMatrix(); } }
public static synchronized PlayerConfiguration getPlayerConfiguration(AbstractClientPlayer p_getPlayerConfiguration_0_) { if (reloadPlayerItems && System.currentTimeMillis() > timeReloadPlayerItemsMs + 5000L) { AbstractClientPlayer abstractclientplayer = Minecraft.getMinecraft().player; if (abstractclientplayer != null) { setPlayerConfiguration(abstractclientplayer.getNameClear(), (PlayerConfiguration)null); timeReloadPlayerItemsMs = System.currentTimeMillis(); } } String s1 = p_getPlayerConfiguration_0_.getNameClear(); if (s1 == null) { return null; } else { PlayerConfiguration playerconfiguration = (PlayerConfiguration)getMapConfigurations().get(s1); if (playerconfiguration == null) { playerconfiguration = new PlayerConfiguration(); getMapConfigurations().put(s1, playerconfiguration); PlayerConfigurationReceiver playerconfigurationreceiver = new PlayerConfigurationReceiver(s1); String s = "http://s.optifine.net/users/" + s1 + ".cfg"; FileDownloadThread filedownloadthread = new FileDownloadThread(s, playerconfigurationreceiver); filedownloadthread.start(); } return playerconfiguration; } }
@Override protected boolean canRenderName(AbstractClientPlayer entity) { EntityPlayerSP entityplayersp = Minecraft.getMinecraft().player; if (TF2Util.isOnSameTeam(entity, entityplayersp)) return super.canRenderName(entity); else { boolean flag = !entity.isInvisibleToPlayer(entityplayersp); if (entity != entityplayersp) { Team team = Minecraft.getMinecraft().world.getScoreboard().getPlayersTeam( WeaponsCapability.get(entity).getDisguiseType().substring(2)); Team team1 = entityplayersp.getTeam(); if (team != null) { Team.EnumVisible team$enumvisible = team.getNameTagVisibility(); switch (team$enumvisible) { case ALWAYS: return flag; case NEVER: return false; case HIDE_FOR_OTHER_TEAMS: return team1 == null ? flag : team.isSameTeam(team1) && (team.getSeeFriendlyInvisiblesEnabled() || flag); case HIDE_FOR_OWN_TEAM: return team1 == null ? flag : !team.isSameTeam(team1) && flag; default: return true; } } } return Minecraft.isGuiEnabled() && entity != this.renderManager.renderViewEntity && flag && !entity.isBeingRidden(); } }
public void renderRightArm(AbstractClientPlayer clientPlayer) { float f = 1.0F; GlStateManager.color(f, f, f); ModelPlayer modelplayer = this.getMainModel(); this.setModelVisibilities(clientPlayer); modelplayer.swingProgress = 0.0F; modelplayer.isSneak = false; modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer); modelplayer.renderRightArm(); }
public void renderLeftArm(AbstractClientPlayer clientPlayer) { float f = 1.0F; GlStateManager.color(f, f, f); ModelPlayer modelplayer = this.getMainModel(); this.setModelVisibilities(clientPlayer); modelplayer.isSneak = false; modelplayer.swingProgress = 0.0F; modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer); modelplayer.renderLeftArm(); }
/** * Sets a simple glTranslate on a LivingEntity. */ protected void renderLivingAt(AbstractClientPlayer entityLivingBaseIn, double x, double y, double z) { if (entityLivingBaseIn.isEntityAlive() && entityLivingBaseIn.isPlayerSleeping()) { super.renderLivingAt(entityLivingBaseIn, x + (double)entityLivingBaseIn.renderOffsetX, y + (double)entityLivingBaseIn.renderOffsetY, z + (double)entityLivingBaseIn.renderOffsetZ); } else { super.renderLivingAt(entityLivingBaseIn, x, y, z); } }
/** * Renders the desired {@code T} type Entity. */ public void doRender(AbstractClientPlayer entity, double x, double y, double z, float entityYaw, float partialTicks) { if (!entity.isUser() || this.renderManager.renderViewEntity == entity) { double d0 = y; if (entity.isSneaking() && !(entity instanceof EntityPlayerSP)) { d0 = y - 0.125D; } this.setModelVisibilities(entity); GlStateManager.enableBlendProfile(GlStateManager.Profile.PLAYER_SKIN); if (Hacks.findMod(Chams.class).isEnabled()) { GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL); GlStateManager.enablePolygonOffset(); GlStateManager.doPolygonOffset(1.0F, -1000000); super.doRender(entity, x, d0, z, entityYaw, partialTicks); GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL); GlStateManager.doPolygonOffset(1.0F, 1000000); GlStateManager.disablePolygonOffset(); }else{ super.doRender(entity, x, d0, z, entityYaw, partialTicks); } GlStateManager.disableBlendProfile(GlStateManager.Profile.PLAYER_SKIN); } }
@Override protected int getTeamColor(AbstractClientPlayer entityIn) { int i = 16777215; ScorePlayerTeam scoreplayerteam = entityIn.world.getScoreboard() .getPlayersTeam(WeaponsCapability.get(entityIn).getDisguiseType().substring(2)); if (scoreplayerteam != null) { String s = FontRenderer.getFormatFromString(scoreplayerteam.getPrefix()); if (s.length() >= 2) i = this.getFontRendererFromRenderManager().getColorCode(s.charAt(1)); } return i; }