GuiUtils.java 文件源码

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

项目:TheDragonLib 作者:
/**
 * Draws a slot that is disabled...
 *
 * @param x          slot x
 * @param y          slot y
 * @param renderItem Item Render
 */
public static void drawDisabledSlot(int x, int y, RenderItem renderItem) {
    new GuiUtils().zLevel = 100.f;
    renderItem.zLevel = 100.0f;

    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    int colorOverlay = new Color(139, 139, 139, 200).hashCode();
    GlStateManager.disableLighting();
    GlStateManager.disableDepth();
    GlStateManager.colorMask(true, true, true, false);
    renderItem.renderItemAndEffectIntoGUI(new ItemStack(Blocks.AIR), x, y);
    new GuiUtils().drawGradientRect(x, y, x + 16, y + 16, colorOverlay, colorOverlay);
    GlStateManager.colorMask(true, true, true, true);
    GlStateManager.enableLighting();
    GlStateManager.enableDepth();
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

    new GuiUtils().zLevel = 0.0f;
    renderItem.zLevel = 0.0f;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号