GuiIngame.java 文件源码

java
阅读 20 收藏 0 点赞 0 评论 0

项目:BaseClient 作者:
private void func_180474_b(float p_180474_1_, ScaledResolution p_180474_2_) {
    if (p_180474_1_ < 1.0F) {
        p_180474_1_ = p_180474_1_ * p_180474_1_;
        p_180474_1_ = p_180474_1_ * p_180474_1_;
        p_180474_1_ = p_180474_1_ * 0.8F + 0.2F;
    }

    GlStateManager.disableAlpha();
    GlStateManager.disableDepth();
    GlStateManager.depthMask(false);
    GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
    GlStateManager.color(1.0F, 1.0F, 1.0F, p_180474_1_);
    this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
    TextureAtlasSprite textureatlassprite = this.mc.getBlockRendererDispatcher().getBlockModelShapes()
            .getTexture(Blocks.portal.getDefaultState());
    float f = textureatlassprite.getMinU();
    float f1 = textureatlassprite.getMinV();
    float f2 = textureatlassprite.getMaxU();
    float f3 = textureatlassprite.getMaxV();
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();
    worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
    worldrenderer.pos(0.0D, (double) p_180474_2_.getScaledHeight(), -90.0D).tex((double) f, (double) f3)
            .endVertex();
    worldrenderer.pos((double) p_180474_2_.getScaledWidth(), (double) p_180474_2_.getScaledHeight(), -90.0D)
            .tex((double) f2, (double) f3).endVertex();
    worldrenderer.pos((double) p_180474_2_.getScaledWidth(), 0.0D, -90.0D).tex((double) f2, (double) f1)
            .endVertex();
    worldrenderer.pos(0.0D, 0.0D, -90.0D).tex((double) f, (double) f1).endVertex();
    tessellator.draw();
    GlStateManager.depthMask(true);
    GlStateManager.enableDepth();
    GlStateManager.enableAlpha();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号