mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-12 00:07:37 +00:00
Workaround to prevent crashes with invalid pillar meta. Fixes #277
This commit is contained in:
1 parent
be7ba84d09
commit
a5e71b4c71
1 file changed
+6
-1
@@ -31,7 +31,12 @@ public class BlockCarvablePillar extends BlockCarvable {
|
||||
}
|
||||
|
||||
public IIcon getCtmIcon(int index, int metadata) {
|
||||
CarvableVariation var = carverHelper.variations.get(metadata);
|
||||
//Workaround to prevent crash with invalid meta
|
||||
CarvableVariation var = null;
|
||||
if(metadata <= carverHelper.variations.size())
|
||||
var = carverHelper.variations.get(metadata);
|
||||
else
|
||||
var = carverHelper.variations.get(0);
|
||||
|
||||
if (index >= 4)
|
||||
return var.iconTop;
|
||||
|
||||
Reference in new issue
Block a user