Reconstructor now shows item

This commit is contained in:
Ellpeck 2015-12-21 23:53:01 +01:00
parent 5078007335
commit ad23456456
2 changed files with 10 additions and 7 deletions

View file

@ -13,6 +13,7 @@ package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
import ellpeck.actuallyadditions.booklet.page.BookletPage;
import ellpeck.actuallyadditions.items.lens.ItemLens;
import ellpeck.actuallyadditions.tile.TileEntityAtomicReconstructor;
import ellpeck.actuallyadditions.util.ModUtil;
@ -151,8 +152,10 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud
}
else{
strg = slot.getItem().getItemStackDisplayName(slot);
BookletPage.renderItem(null, slot, resolution.getScaledWidth()/2+15, resolution.getScaledHeight()/2-29, 1F);
}
minecraft.fontRenderer.drawStringWithShadow(EnumChatFormatting.GOLD+""+EnumChatFormatting.ITALIC+strg, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, StringUtil.DECIMAL_COLOR_WHITE);
minecraft.fontRenderer.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg, resolution.getScaledWidth()/2+35, resolution.getScaledHeight()/2-25, StringUtil.DECIMAL_COLOR_WHITE);
}
}
}

View file

@ -57,18 +57,18 @@ public class BookletPage{
GL11.glTranslated(x, y, 0);
GL11.glScalef(scale, scale, scale);
boolean flagBefore = gui.mc.fontRenderer.getUnicodeFlag();
gui.mc.fontRenderer.setUnicodeFlag(false);
RenderItem.getInstance().renderItemAndEffectIntoGUI(gui.mc.fontRenderer, gui.mc.getTextureManager(), stack, 0, 0);
RenderItem.getInstance().renderItemOverlayIntoGUI(gui.mc.fontRenderer, gui.mc.getTextureManager(), stack, 0, 0);
gui.mc.fontRenderer.setUnicodeFlag(flagBefore);
Minecraft mc = Minecraft.getMinecraft();
boolean flagBefore = mc.fontRenderer.getUnicodeFlag();
mc.fontRenderer.setUnicodeFlag(false);
RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), stack, 0, 0);
RenderItem.getInstance().renderItemOverlayIntoGUI(mc.fontRenderer, mc.getTextureManager(), stack, 0, 0);
mc.fontRenderer.setUnicodeFlag(flagBefore);
//GL+MC+NEI suck
if(gui instanceof GuiBooklet){
RenderHelper.disableStandardItemLighting();
}
GL11.glPopMatrix();
}
public void addToPagesWithItemStackData(){