Fixed LaserMedium texture IndexOutOfBounds
This commit is contained in:
parent
3a8751c14c
commit
e796e4cd1a
2 changed files with 4 additions and 2 deletions
0
gradlew
vendored
Normal file → Executable file
0
gradlew
vendored
Normal file → Executable 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
|
||||
|
@ -69,4 +71,4 @@ public class BlockLaserMedium extends BlockContainer {
|
|||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue