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.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase; import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
import ellpeck.actuallyadditions.booklet.page.BookletPage;
import ellpeck.actuallyadditions.items.lens.ItemLens; import ellpeck.actuallyadditions.items.lens.ItemLens;
import ellpeck.actuallyadditions.tile.TileEntityAtomicReconstructor; import ellpeck.actuallyadditions.tile.TileEntityAtomicReconstructor;
import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.ModUtil;
@ -151,8 +152,10 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud
} }
else{ else{
strg = slot.getItem().getItemStackDisplayName(slot); 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.glTranslated(x, y, 0);
GL11.glScalef(scale, scale, scale); GL11.glScalef(scale, scale, scale);
boolean flagBefore = gui.mc.fontRenderer.getUnicodeFlag(); Minecraft mc = Minecraft.getMinecraft();
gui.mc.fontRenderer.setUnicodeFlag(false); boolean flagBefore = mc.fontRenderer.getUnicodeFlag();
RenderItem.getInstance().renderItemAndEffectIntoGUI(gui.mc.fontRenderer, gui.mc.getTextureManager(), stack, 0, 0); mc.fontRenderer.setUnicodeFlag(false);
RenderItem.getInstance().renderItemOverlayIntoGUI(gui.mc.fontRenderer, gui.mc.getTextureManager(), stack, 0, 0); RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), stack, 0, 0);
gui.mc.fontRenderer.setUnicodeFlag(flagBefore); RenderItem.getInstance().renderItemOverlayIntoGUI(mc.fontRenderer, mc.getTextureManager(), stack, 0, 0);
mc.fontRenderer.setUnicodeFlag(flagBefore);
//GL+MC+NEI suck //GL+MC+NEI suck
if(gui instanceof GuiBooklet){ if(gui instanceof GuiBooklet){
RenderHelper.disableStandardItemLighting(); RenderHelper.disableStandardItemLighting();
} }
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
public void addToPagesWithItemStackData(){ public void addToPagesWithItemStackData(){