Fixed LaserMedium texture IndexOutOfBounds

This commit is contained in:
Cr0s 2015-10-24 23:46:13 +03:00
parent 3a8751c14c
commit e796e4cd1a
2 changed files with 4 additions and 2 deletions

0
gradlew vendored Normal file → Executable file
View file

View file

@ -42,7 +42,9 @@ public class BlockLaserMedium extends BlockContainer {
return iconBuffer[8];
}
return iconBuffer[metadata];
int index = metadata >= iconBuffer.length ? iconBuffer.length - 1 : metadata;
return iconBuffer[index];
}
@Override