ItemStackButton.java 文件源码

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

项目:Industrial-Foregoing 作者:
@Override
public void drawButton(Minecraft mc, int mouseX, int mouseY, float partialTicks) {
    if (this.visible) {
        this.hovered = mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height;
        RenderHelper.enableGUIStandardItemLighting();
        GlStateManager.scale(width / 16f, width / 16f, width / 16f);
        GlStateManager.color(1f, 1f, 1f);
        mc.getRenderItem().renderItemIntoGUI(stack, (int) (x / (width / 16f)), (int) (y / (width / 16f)));
        GlStateManager.scale(1 / (width / 16f), 1 / (width / 16f), 1 / (width / 16f));
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号