mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -04:00
rendering: don't force draw transparent faces
This commit is contained in:
parent
ef990159e7
commit
6ab06cbdfd
@ -141,11 +141,6 @@ class BlockRenderer : BlockRenderInterface {
|
||||
var drawElementFace = true
|
||||
|
||||
neighbourFaceSize?.let {
|
||||
// force draw transparent faces
|
||||
if (transparentFaces[direction.ordinal] || isNeighbourTransparent) {
|
||||
return@let
|
||||
}
|
||||
|
||||
val elementFaceBorderSize = element.faceBorderSize[rotatedDirection.ordinal] ?: return@let
|
||||
for (size in it) {
|
||||
if (elementFaceBorderSize.start.x < size.start.x || elementFaceBorderSize.start.y < size.start.y) {
|
||||
@ -158,6 +153,15 @@ class BlockRenderer : BlockRenderInterface {
|
||||
drawElementFace = false
|
||||
}
|
||||
|
||||
if (!drawElementFace) {
|
||||
// force draw transparent faces
|
||||
if (isNeighbourTransparent && !transparentFaces[direction.ordinal]) {
|
||||
drawElementFace = true
|
||||
} else if (isNeighbourTransparent && transparentFaces[direction.ordinal] && neighbourBlock != blockState) {
|
||||
drawElementFace = true
|
||||
}
|
||||
}
|
||||
|
||||
if (!drawElementFace) {
|
||||
continue
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user