Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
@SideOnly(Side.CLIENT)
public void renderHelmetOverlay(ItemStack itemstack, EntityPlayer player, ScaledResolution resolution, float partialTicks, boolean hasScreen, int mouseX, int mouseY) {
if (player.getCurrentArmor(3) != null) {
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glClearDepth(1.0D);
GL11.glDisable(2929);
GL11.glDisable(3008);
GL11.glDepthMask(false);
GL11.glBlendFunc(770, 771);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
ResourceLocation defaultHud = new ResourceLocation("путь к текстуре");
(Minecraft.getMinecraft()).renderEngine.bindTexture(defaultHud);
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0.0D, resolution.getScaledHeight(), -90.0D, 0.0D, 1.0D);
tessellator.addVertexWithUV(resolution.getScaledWidth(), resolution.getScaledHeight(), -90.0D, 1.0D, 1.0D);
tessellator.addVertexWithUV(resolution.getScaledWidth(), 0.0D, -90.0D, 1.0D, 0.0D);
tessellator.addVertexWithUV(0.0D, 0.0D, -90.0D, 0.0D, 0.0D);
tessellator.draw();
GL11.glDepthMask(true);
GL11.glEnable(2929);
GL11.glEnable(3008);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(3042);
GL11.glPopMatrix();
}
}
Попахивает декомпилятором.<...> GL11.glEnable(3042); <...> GL11.glDisable(2929); GL11.glDisable(3008); <...> GL11.glBlendFunc(770, 771); <...>

иногда народ напрямую копируют такое...декомпилятором.
это на 1.7.10 по-моему, но, кажется, я уже разобралсяотрисовка худа
Java:@SideOnly(Side.CLIENT) public void renderHelmetOverlay(ItemStack itemstack, EntityPlayer player, ScaledResolution resolution, float partialTicks, boolean hasScreen, int mouseX, int mouseY) { if (player.getCurrentArmor(3) != null) { GL11.glPushMatrix(); GL11.glEnable(3042); GL11.glClearDepth(1.0D); GL11.glDisable(2929); GL11.glDisable(3008); GL11.glDepthMask(false); GL11.glBlendFunc(770, 771); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); ResourceLocation defaultHud = new ResourceLocation("путь к текстуре"); (Minecraft.getMinecraft()).renderEngine.bindTexture(defaultHud); Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); tessellator.addVertexWithUV(0.0D, resolution.getScaledHeight(), -90.0D, 0.0D, 1.0D); tessellator.addVertexWithUV(resolution.getScaledWidth(), resolution.getScaledHeight(), -90.0D, 1.0D, 1.0D); tessellator.addVertexWithUV(resolution.getScaledWidth(), 0.0D, -90.0D, 1.0D, 0.0D); tessellator.addVertexWithUV(0.0D, 0.0D, -90.0D, 0.0D, 0.0D); tessellator.draw(); GL11.glDepthMask(true); GL11.glEnable(2929); GL11.glEnable(3008); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(3042); GL11.glPopMatrix(); } }