remove cull face

Determinant by minosoft now. maybe transparency breaks
This commit is contained in:
Moritz Zwerger 2023-07-30 18:43:48 +02:00
parent d21dd70abe
commit dc00c01bf9
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
4 changed files with 9 additions and 11 deletions

View File

@ -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,

View File

@ -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>? {

View File

@ -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

View File

@ -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,
) {