Item rendering of prints with two states will now alternate the state rendered.

This commit is contained in:
Florian Nücke 2015-04-06 19:16:00 +02:00
parent 77944aa0c0
commit d9d6fa351d

View File

@ -165,11 +165,16 @@ object ItemRenderer extends IItemRenderer {
val data = new PrintData(stack)
Minecraft.getMinecraft.renderEngine.bindTexture(TextureMap.locationBlocksTexture)
for (shape <- data.stateOff) {
val state =
if (data.stateOn.size > 0 && System.currentTimeMillis() / 2000 % 2 == 0)
data.stateOn
else
data.stateOff
for (shape <- state) {
drawShape(shape)
}
if (data.stateOff.isEmpty) {
drawShape(nullShape)
if (state.isEmpty) {
drawShape(nullShape) // Avoid tessellator erroring.
}
GL11.glPopMatrix()