mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-16 10:55:01 -04:00
rendering: fix NullPointerException in chunk preparing
This commit is contained in:
parent
6ab06cbdfd
commit
40d253ea84
@ -117,14 +117,14 @@ class BlockRenderer : BlockRenderInterface {
|
||||
return
|
||||
}
|
||||
for (direction in Directions.DIRECTIONS) {
|
||||
val rotatedDirection = directionMapping[direction]!!
|
||||
val rotatedDirection = directionMapping[direction] ?: direction
|
||||
val invertedDirection = direction.inversed
|
||||
var isNeighbourTransparent = false
|
||||
var neighbourFaceSize: Array<FaceSize>? = null
|
||||
val neighbourBlock = neighbourBlocks[direction.ordinal]
|
||||
neighbourBlock?.getBlockRenderer(blockPosition + direction)?.let {
|
||||
val itDirection = if (it is BlockRenderer) {
|
||||
it.directionMapping[invertedDirection]!!
|
||||
it.directionMapping[invertedDirection] ?: invertedDirection
|
||||
} else {
|
||||
invertedDirection
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user