public static void renderItemIdentifierStackListIntoGui(List<ItemIdentifierStack> _allItems, IItemSearch IItemSearch, int page, int left, int top, int columns, int items, int xSize, int ySize, Minecraft mc, boolean displayAmount, boolean forcenumber, boolean color, boolean disableEffect) {
GL11.glPushMatrix();
int ppi = 0;
int column = 0;
int row = 0;
FontRenderer fontRenderer = mc.fontRenderer;
RenderItem renderItem = new RenderItem();
RenderBlocks renderBlocks = new RenderBlocks();
renderItem.renderWithColor = color;
for(ItemIdentifierStack itemStack: _allItems) {
if(itemStack == null) {
column++;
if(column >= columns) {
row++;
column = 0;
}
ppi++;
continue;
}
ItemIdentifier item = itemStack.getItem();
if(IItemSearch != null && !IItemSearch.itemSearched(item)) continue;
ppi++;
if(ppi <= items * page) continue;
if(ppi > items * (page + 1)) continue;
ItemStack st = itemStack.unsafeMakeNormalStack();
int x = left + xSize * column;
int y = top + ySize * row;
GL11.glDisable(GL11.GL_LIGHTING);
if(st != null) {
if(disableEffect) {
if(st != null) {
if( !ForgeHooksClient.renderInventoryItem(renderBlocks, mc.renderEngine, st, renderItem.renderWithColor, renderItem.zLevel, x, y)) {
renderItem.renderItemIntoGUI(fontRenderer, mc.renderEngine, st, x, y);
}
}
} else {
GL11.glTranslated(0, 0, 3.0);
renderItem.renderItemAndEffectIntoGUI(fontRenderer, mc.renderEngine, st, x, y);
GL11.glTranslated(0, 0, -3.0);
}
}
GL11.glEnable(GL11.GL_LIGHTING);
if(displayAmount) {
String s;
if(st.stackSize == 1 && !forcenumber) {
s = "";
} else if(st.stackSize < 1000) {
s = st.stackSize + "";
} else if(st.stackSize < 100000) {
s = st.stackSize / 1000 + "K";
} else if(st.stackSize < 1000000) {
s = "0M" + st.stackSize / 100000;
} else {
s = st.stackSize / 1000000 + "M";
}
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glTranslated(0.0D, 0.0D, 100.0D);
drawStringWithShadow(fontRenderer, s, x + 16 - fontRenderer.getStringWidth(s), y + 8, 0xFFFFFF);
GL11.glTranslated(0.0D, 0.0D, -100.0D);
GL11.glEnable(GL11.GL_LIGHTING);
}
column++;