mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 18:05:51 -04:00
remove cull face
Determinant by minosoft now. maybe transparency breaks
This commit is contained in:
parent
d21dd70abe
commit
dc00c01bf9
@ -150,12 +150,12 @@ class BlockModelTest {
|
||||
from = Vec3(0, 0, 0),
|
||||
to = Vec3(1, 1, 1),
|
||||
faces = mapOf(
|
||||
Directions.DOWN to ModelFace("#down", FaceUV(Vec2(0, 1), Vec2(1, 0)), 0, Directions.DOWN, -1),
|
||||
Directions.UP to ModelFace("#up", FaceUV(Vec2(0, 1), Vec2(1, 0)), 0, Directions.UP, -1),
|
||||
Directions.NORTH to ModelFace("#north", FaceUV(Vec2(0, 1), Vec2(1, 0)), 0, Directions.NORTH, -1),
|
||||
Directions.SOUTH to ModelFace("#south", FaceUV(Vec2(0, 1), Vec2(1, 0)), 0, Directions.SOUTH, -1),
|
||||
Directions.WEST to ModelFace("#west", FaceUV(Vec2(0, 1), Vec2(1, 0)), 0, Directions.WEST, -1),
|
||||
Directions.EAST to ModelFace("#east", FaceUV(Vec2(0, 1), Vec2(1, 0)), 0, Directions.EAST, -1),
|
||||
Directions.DOWN to ModelFace("#down", FaceUV(Vec2(0, 1), Vec2(1, 0)), 0, -1),
|
||||
Directions.UP to ModelFace("#up", FaceUV(Vec2(0, 1), Vec2(1, 0)), 0, -1),
|
||||
Directions.NORTH to ModelFace("#north", FaceUV(Vec2(0, 1), Vec2(1, 0)), 0, -1),
|
||||
Directions.SOUTH to ModelFace("#south", FaceUV(Vec2(0, 1), Vec2(1, 0)), 0, -1),
|
||||
Directions.WEST to ModelFace("#west", FaceUV(Vec2(0, 1), Vec2(1, 0)), 0, -1),
|
||||
Directions.EAST to ModelFace("#east", FaceUV(Vec2(0, 1), Vec2(1, 0)), 0, -1),
|
||||
),
|
||||
shade = true,
|
||||
rotation = null,
|
||||
|
@ -36,7 +36,6 @@ data class ModelFace(
|
||||
val texture: String,
|
||||
val uv: FaceUV,
|
||||
val rotation: Int,
|
||||
val cull: Directions?,
|
||||
val tintIndex: Int = -1,
|
||||
) {
|
||||
|
||||
@ -79,10 +78,9 @@ data class ModelFace(
|
||||
} ?: fallbackUV(direction, from, to)
|
||||
|
||||
val rotation = data["rotation"]?.toInt()?.rotation() ?: 0
|
||||
val cull = data["cullface"]?.toString()?.let { if (it == "none") null else Directions[it] }
|
||||
val tintIndex = data["tintindex"]?.toInt() ?: TintManager.DEFAULT_TINT_INDEX
|
||||
|
||||
return ModelFace(texture, uv, rotation, cull, tintIndex)
|
||||
return ModelFace(texture, uv, rotation, tintIndex)
|
||||
}
|
||||
|
||||
fun deserialize(from: Vec3, to: Vec3, data: Map<String, JsonObject>): Map<Directions, ModelFace>? {
|
||||
|
@ -146,7 +146,7 @@ data class SingleBlockStateApply(
|
||||
val shade = rotatedDirection.shade
|
||||
|
||||
val a = positions.properties(rotatedDirection)
|
||||
val bakedFace = BakedFace(positions, uv, shade, face.tintIndex, face.cull, texture, a)
|
||||
val bakedFace = BakedFace(positions, uv, shade, face.tintIndex, if (a == null) null else rotatedDirection, texture, a)
|
||||
|
||||
bakedFaces[rotatedDirection.ordinal] += bakedFace
|
||||
properties[rotatedDirection.ordinal] += a ?: continue
|
||||
|
@ -30,7 +30,7 @@ class BakedFace(
|
||||
val uv: FloatArray,
|
||||
val shade: Float,
|
||||
val tintIndex: Int,
|
||||
val cull: Directions?,
|
||||
cull: Directions?,
|
||||
val texture: Texture,
|
||||
val properties: FaceProperties? = null,
|
||||
) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user