From e796e4cd1a0c75bebc2fd9e2af8887032dcde975 Mon Sep 17 00:00:00 2001 From: Cr0s Date: Sat, 24 Oct 2015 23:46:13 +0300 Subject: [PATCH] Fixed LaserMedium texture IndexOutOfBounds --- gradlew | 0 src/main/java/cr0s/warpdrive/block/BlockLaserMedium.java | 6 ++++-- 2 files changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 gradlew diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/src/main/java/cr0s/warpdrive/block/BlockLaserMedium.java b/src/main/java/cr0s/warpdrive/block/BlockLaserMedium.java index fba344d8..8da69777 100644 --- a/src/main/java/cr0s/warpdrive/block/BlockLaserMedium.java +++ b/src/main/java/cr0s/warpdrive/block/BlockLaserMedium.java @@ -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; } -} \ No newline at end of file +}