why things are keep happening?

This commit is contained in:
minjaesong
2017-05-03 14:41:09 +09:00
parent cbb4eaad94
commit a9d35678c5
3 changed files with 14 additions and 7 deletions

View File

@@ -42,14 +42,18 @@ object BlockCodex {
}
}
fun get(index: Int): BlockProp {
/*fun get(index: Int): BlockProp {
try {
return blockProps[index]
}
catch (e: NullPointerException) {
throw NullPointerException("Blockprop with id $index does not exist.")
}
}
catch (e1: ArrayIndexOutOfBoundsException) {
if (index == -1) return nullProp
else throw e1
}
}*/
operator fun get(rawIndex: Int?): BlockProp {
if (rawIndex == null || rawIndex == Block.NULL) {