private void doMapRendering(ItemStack item, HeraldryData heraldryData, IHeraldryItem item1) {
glPushMatrix();
//glDepthFunc(GL11.GL_EQUAL);
//glEnable(GL_BLEND);
//glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Tessellator tess = Tessellator.getInstance();
Minecraft.getMinecraft().getTextureManager().bindTexture(map_overlay);
tess.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.ITEM);
tess.getBuffer().pos(-8, 136, -.01).tex(0, 1).endVertex();
tess.getBuffer().pos(136, 136, -.01).tex(1, 1).endVertex();
tess.getBuffer().pos(136, -8, -.01).tex(1, 0).endVertex();
tess.getBuffer().pos(-8, -8, -.01).tex(0, 0).endVertex();
tess.draw();
//glDisable(GL_BLEND);
//glDepthFunc(GL11.GL_LEQUAL);
RefreshableTexture currentCrest = new RefreshableTexture(32, 32);
currentCrest.refreshWith(heraldryData, false);
ResourceLocation crestLocation = Minecraft.getMinecraft().getTextureManager().getDynamicTextureLocation("gui_crest", currentCrest);
ITextureObject texture = Minecraft.getMinecraft().getTextureManager().getTexture(crestLocation);
if(texture == null){
texture = new HeraldryTextureSmall(heraldryData);
Minecraft.getMinecraft().getTextureManager().loadTexture(crestLocation, texture);
}
Minecraft.getMinecraft().getTextureManager().bindTexture(crestLocation);
tess.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.ITEM);
tess.getBuffer().pos(8, 120, -0.015).tex(0, 1).endVertex();
tess.getBuffer().pos(120, 120, -0.015).tex(1, 1).endVertex();
tess.getBuffer().pos(120, 8, -0.015).tex(1, 0).endVertex();
tess.getBuffer().pos(8, 8, -0.015).tex(0, 0).endVertex();
tess.draw();
glPopMatrix();
}
HeraldryCrestItemRenderer.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:Battlegear2
作者:
评论列表
文章目录