mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 02:15:34 -04:00
fix baking util test
This commit is contained in:
parent
6bf89cf3f5
commit
fac99f945a
@ -30,7 +30,6 @@ import de.bixilon.minosoft.gui.rendering.models.block.state.baked.SideSize
|
||||
import de.bixilon.minosoft.gui.rendering.models.loader.BlockLoader
|
||||
import de.bixilon.minosoft.gui.rendering.system.base.texture.TextureManager
|
||||
import de.bixilon.minosoft.util.KUtil.toResourceLocation
|
||||
import java.util.*
|
||||
|
||||
data class SingleBlockStateApply(
|
||||
val model: BlockModel,
|
||||
@ -112,7 +111,7 @@ data class SingleBlockStateApply(
|
||||
if (model.elements == null) return null
|
||||
|
||||
val bakedFaces: Array<MutableList<BakedFace>> = Array(Directions.SIZE) { mutableListOf() }
|
||||
val sizes: MutableMap<Directions, MutableList<SideSize.FaceSize>> = EnumMap(Directions::class.java)
|
||||
val sizes: Array<MutableList<SideSize.FaceSize>> = Array(Directions.SIZE) { mutableListOf() } // TODO
|
||||
|
||||
for (element in model.elements) {
|
||||
for ((direction, face) in element.faces) {
|
||||
|
@ -28,7 +28,7 @@ class BakingUtilTest {
|
||||
fun positionsDown() {
|
||||
assertContentEquals(
|
||||
BakingUtil.positions(Directions.DOWN, from, to),
|
||||
floatArrayOf(1.0f, 2.0f, 3.0f, 6.0f, 2.0f, 3.0f, 6.0f, 2.0f, 4.0f, 1.0f, 2.0f, 4.0f)
|
||||
floatArrayOf(1.0f, 2.0f, 3.0f, 1.0f, 2.0f, 4.0f, 6.0f, 2.0f, 4.0f, 6.0f, 2.0f, 3.0f)
|
||||
)
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ class BakingUtilTest {
|
||||
fun positionsUp() {
|
||||
assertContentEquals(
|
||||
BakingUtil.positions(Directions.UP, from, to),
|
||||
floatArrayOf(1.0f, 5.0f, 3.0f, 1.0f, 5.0f, 4.0f, 6.0f, 5.0f, 4.0f, 6.0f, 5.0f, 3.0f)
|
||||
floatArrayOf(1.0f, 5.0f, 3.0f, 6.0f, 5.0f, 3.0f, 6.0f, 5.0f, 4.0f, 1.0f, 5.0f, 4.0f)
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user