Skip to content

Commit c3fe8fa

Browse files
committed
chunk rendering: fix ignoring if model matches
1 parent 6722d7c commit c3fe8fa

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/de/bixilon/minosoft/gui/rendering/chunk/util/ChunkRendererChangeListener.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ object ChunkRendererChangeListener {
4444
if (state != null && state.block is FluidBlock) {
4545
return state.block.fluid.getHeight(state) == state.block.fluid.getHeight(previous)
4646
}
47+
val previousModel = previous?.model ?: previous?.block?.model
4748

48-
if (model == null && previous?.model == null) return true
49-
if ((model == null) != (previous?.model == null)) return false
49+
if (model == null && previousModel == null) return true
50+
if ((model == null) != (previousModel == null)) return false
5051
if (state == null || model == null) Broken()
5152

5253

0 commit comments

Comments
 (0)