<http://i.imgur.com/iwA6PZH.png>
# announcements
e

http://i.imgur.com/iwA6PZH.png

k
blockData[] is int[]
, right?
You can also try just pasting the Java code in Idea and it will automatically convert it to Kotlin.
e
blockData :
Array<ByteArray>
k
And
x
is?
e
x:
Int
I already tryed converter..not helped
I fixed blockData type. Forgot that it's 2D array
k
wait
blockData
is an array of arrays? Of course you can't right-shift an array.
shr
shifts the bits of an
Int
, not elements of an array
e
val b: Byte = blockData[y shr 4][off]
it's fine
k
Ah right didn't notice that, my bad.
e
i fixed it! you gave me idea
val b: Int = blockData[y shr 4][off].toInt()
ty!
k
Did you try casting everything to the left of shr to int?
Ah what was the problem?
Okay, glad you managed to fix it!
1
❤️ 1