fix fluid animation uv

This commit is contained in:
Bixilon 2023-09-14 23:49:48 +02:00
parent 5231b68e4a
commit ba73ac5efb
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -136,12 +136,11 @@ class FluidSectionMesher(
val minUV = Vec2.EMPTY val minUV = Vec2.EMPTY
val maxUV = Vec2(if (still) 1.0f else 0.5f) // Minecraft just uses half of the sprite val maxUV = Vec2(if (still) 1.0f else 0.5f) // Minecraft just uses half of the sprite
val texturePositions = arrayOf( val texturePositions = arrayOf(
Vec2(maxUV.x, minUV.y),
minUV, minUV,
Vec2(minUV.x, maxUV.y), Vec2(maxUV.x, minUV.y),
maxUV, maxUV,
Vec2(minUV.x, maxUV.y),
) )
@ -227,10 +226,10 @@ class FluidSectionMesher(
Vec3(faceXEnd, offsetPosition.y + v2, faceZEnd), Vec3(faceXEnd, offsetPosition.y + v2, faceZEnd),
) )
val texturePositions = arrayOf( val texturePositions = arrayOf(
TEXTURE_1,
Vec2(0.0f, (1 - v1) / 2), Vec2(0.0f, (1 - v1) / 2),
Vec2(0.5f, (1 - v2) / 2), TEXTURE_1,
TEXTURE_2, TEXTURE_2,
Vec2(0.5f, (1 - v2) / 2),
) )
val meshToUse = model.flowing.transparency.getMesh(mesh) val meshToUse = model.flowing.transparency.getMesh(mesh)