public static void renderPoison(Minecraft mc)
{
PlayerAether playerAether = PlayerAether.get(mc.thePlayer);
if(playerAether.isPoisoned())
{
ScaledResolution scaledresolution = new ScaledResolution(mc);
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer renderer = tessellator.getBuffer();
float alpha = getPoisonAlpha((float)(playerAether.poisonInstance().poisonTime % 50) / 50F);
int width = scaledresolution.getScaledWidth();
int height = scaledresolution.getScaledHeight();
GlStateManager.pushMatrix();
GlStateManager.enableBlend();
GlStateManager.disableDepth();
GlStateManager.depthMask(false);
GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.disableAlpha();
mc.renderEngine.bindTexture(TEXTURE_POISON_VIGNETTE);
renderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
renderer.pos(0.0D, (double)height, -90.0D).tex(0.0D, 1.0D).color(0.5F, 0.5F, 0.5F, alpha).endVertex();
renderer.pos((double)width, (double)height, -90.0D).tex(1.0D, 1.0D).color(0.5F, 0.5F, 0.5F, alpha).endVertex();
renderer.pos((double)width, 0.0D, -90.0D).tex(1.0D, 0.0D).color(0.5F, 0.5F, 0.5F, alpha).endVertex();
renderer.pos(0.0D, 0.0D, -90.0D).tex(0.0D, 0.0D).color(0.5F, 0.5F, 0.5F, alpha).endVertex();
tessellator.draw();
GlStateManager.depthMask(true);
GlStateManager.enableDepth();
GlStateManager.enableAlpha();
GlStateManager.disableBlend();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.popMatrix();
}
}
AetherOverlay.java 文件源码
java
阅读 16
收藏 0
点赞 0
评论 0
项目:Aether-Legacy
作者:
评论列表
文章目录