private int[] getDisplayLists(int liquidId, World world) { if (stage.containsKey(liquidId)) return stage.get(liquidId); int[] d = new int[displayStages]; stage.put(liquidId, d); BlockInterface block = new BlockInterface(); // Retrieve the texture depending on type of item. if (liquidId < Block.blocksList.length && Block.blocksList[liquidId] != null) block.texture = Block.blocksList[liquidId].blockIndexInTexture; else if (Item.itemsList[liquidId] != null) block.texture = Item.itemsList[liquidId].getIconFromDamage(0); else return null; for (int s = 0; s < displayStages; ++s) { d[s] = GLAllocation.generateDisplayLists(1); GL11.glNewList(d[s], 4864 /* GL_COMPILE */); block.minX = 0.5 - 4F * factor + 0.01; block.minY = 0; block.minZ = 0.5 - 4F * factor + 0.01; block.maxX = 0.5 + 4F * factor - 0.01; block.maxY = (float) s / (float) displayStages; block.maxZ = 0.5 + 4F * factor - 0.01; RenderEntityBlock.renderBlock(block, world, 0, 0, 0, false, true); GL11.glEndList(); } return d; }