int index = 0;
Iterator modules = moduleList.iterator();
while(modules.hasNext()) {
Module module = (Module) modules.next();
module.getXPos().updateAnimation(); // Updating xpos anim
module.getYPos().updateAnimation(); // Updating ypos anim
module.updatePos(); // using method which we created
if (module.getYPos().getTarget() != distance + y) {
module.getYPos().animate(distance + y, 350.0D, Easings.QUAD_BOTH);
}
if (!(module.getXPos().getValue() <= distance)) {
Gui.drawRect((double)sr.getScaledWidth() - module.getXPos().getValue() - 8.0D, module.getYPos().getValue(), (double)sr.getScaledWidth() + fontrenderer.getStringWidth(module.getName()) - module.getXPos().getValue(), module.getYPos().getValue() + 4.0D + (double)fontrenderer.FONT_HEIGHT + 2.0D, new Color(0, 0, 0, 125).getRGB()); // drawing rect
fontrenderer.drawStringWithShadow(module.getName(), (double)(sr.getScaledWidth() - 5) - module.getXPos().getValue(), (float)(module.getYPos().getValue() + 2.0D + (double)(fontrenderer.getHeight() / 2)), color); // drawing text
y += (double)(fontrenderer.FONT_HEIGHT + 6);
++index;
}
}