Skip to content

Commit 411360c

Browse files
committed
fix stair light test
Old models don't have the shapes implemented (yet)
1 parent 8172c47 commit 411360c

File tree

1 file changed

+5
-4
lines changed
  • src/integration-test/kotlin/de/bixilon/minosoft/data/registries/blocks/types/building

1 file changed

+5
-4
lines changed

src/integration-test/kotlin/de/bixilon/minosoft/data/registries/blocks/types/building/StairsBlockTest.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import org.testng.annotations.Test
3131
class StairsBlockTest {
3232
private val block by lazy { IT.REGISTRIES_LEGACY.block[Oak.Stairs] ?: throw SkipException("") }
3333
private val state by lazy { block.states.default }
34+
private val stateModern by lazy { IT.REGISTRIES.block[Oak.Stairs]!!.states.default }
3435
private val getShape by lazy { StairsBlock::class.java.getDeclaredMethod("getShape", BlockState::class.java, Array<BlockState?>::class.java).apply { setUnsafeAccessible() } }
3536

3637
fun BlockState.getShape(neighbours: Array<BlockState?>): StairsBlock.Shapes {
@@ -108,18 +109,18 @@ class StairsBlockTest {
108109

109110

110111
fun `light properties north`() {
111-
state.withProperties(FACING to Directions.NORTH).testLightProperties(0, true, true, false, booleanArrayOf(false, true, false, true, true, true))
112+
stateModern.withProperties(FACING to Directions.NORTH).testLightProperties(0, true, true, false, booleanArrayOf(false, true, false, true, true, true))
112113
}
113114

114115
fun `light properties south`() {
115-
state.withProperties(FACING to Directions.SOUTH).testLightProperties(0, true, true, false, booleanArrayOf(false, true, true, false, true, true))
116+
stateModern.withProperties(FACING to Directions.SOUTH).testLightProperties(0, true, true, false, booleanArrayOf(false, true, true, false, true, true))
116117
}
117118

118119
fun `light properties west`() {
119-
state.withProperties(FACING to Directions.WEST).testLightProperties(0, true, true, false, booleanArrayOf(false, true, true, true, false, true))
120+
stateModern.withProperties(FACING to Directions.WEST).testLightProperties(0, true, true, false, booleanArrayOf(false, true, true, true, false, true))
120121
}
121122

122123
fun `light properties east`() {
123-
state.withProperties(FACING to Directions.EAST).testLightProperties(0, true, true, false, booleanArrayOf(false, true, true, true, true, false))
124+
stateModern.withProperties(FACING to Directions.EAST).testLightProperties(0, true, true, false, booleanArrayOf(false, true, true, true, true, false))
124125
}
125126
}

0 commit comments

Comments
 (0)