BloodRenderLayer.java 文件源码

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

项目:Wizardry 作者:
@Override
public void doRenderLayer(@Nonnull AbstractClientPlayer entity, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
    IWizardryCapability cap = WizardryCapabilityProvider.getCap(entity);
    if (cap != null) {
        EnumBloodType type = cap.getBloodType();
        if (type != null && type != EnumBloodType.NONE) {
            render.bindTexture(EnumBloodType.getResourceLocation(type));
            ClientUtilMethods.glColor(type.color);
            setModelVisibilities(entity);
            GlStateManager.enableBlendProfile(Profile.PLAYER_SKIN);

            GlStateManager.disableLighting();
            ShaderHelper.INSTANCE.useShader(Shaders.rawColor);

            render.getMainModel().render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);

            GlStateManager.enableLighting();
            ShaderHelper.INSTANCE.releaseShader();

            GlStateManager.disableBlendProfile(Profile.PLAYER_SKIN);
            GlStateManager.color(1.0F, 1.0F, 1.0F);
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号