fix Round Log top and bottom texture rotation
This commit is contained in:
@@ -179,6 +179,8 @@ abstract class AbstractRenderColumn(modId: String) : AbstractBlockRenderingHandl
|
|||||||
var downModel: Model? = null
|
var downModel: Model? = null
|
||||||
var upIcon = upTexture
|
var upIcon = upTexture
|
||||||
var downIcon = downTexture
|
var downIcon = downTexture
|
||||||
|
var shouldRotateUp = true
|
||||||
|
var shouldRotateDown = true
|
||||||
|
|
||||||
when (upType) {
|
when (upType) {
|
||||||
NONSOLID -> upModel = flatTop(quadrants[idx])
|
NONSOLID -> upModel = flatTop(quadrants[idx])
|
||||||
@@ -188,6 +190,7 @@ abstract class AbstractRenderColumn(modId: String) : AbstractBlockRenderingHandl
|
|||||||
} else {
|
} else {
|
||||||
upIcon = sideTexture
|
upIcon = sideTexture
|
||||||
upModel = extendTop(quadrants[idx])
|
upModel = extendTop(quadrants[idx])
|
||||||
|
shouldRotateUp = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PARALLEL -> {
|
PARALLEL -> {
|
||||||
@@ -206,6 +209,7 @@ abstract class AbstractRenderColumn(modId: String) : AbstractBlockRenderingHandl
|
|||||||
} else {
|
} else {
|
||||||
downIcon = sideTexture
|
downIcon = sideTexture
|
||||||
downModel = extendBottom(quadrants[idx])
|
downModel = extendBottom(quadrants[idx])
|
||||||
|
shouldRotateDown = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PARALLEL -> {
|
PARALLEL -> {
|
||||||
@@ -222,7 +226,7 @@ abstract class AbstractRenderColumn(modId: String) : AbstractBlockRenderingHandl
|
|||||||
rotation,
|
rotation,
|
||||||
blockContext.blockCenter,
|
blockContext.blockCenter,
|
||||||
icon = upIcon,
|
icon = upIcon,
|
||||||
rotateUV = { 0 },
|
rotateUV = { if (shouldRotateUp) idx else 0 },
|
||||||
postProcess = noPost
|
postProcess = noPost
|
||||||
)
|
)
|
||||||
if (downModel != null) modelRenderer.render(
|
if (downModel != null) modelRenderer.render(
|
||||||
@@ -231,7 +235,7 @@ abstract class AbstractRenderColumn(modId: String) : AbstractBlockRenderingHandl
|
|||||||
rotation,
|
rotation,
|
||||||
blockContext.blockCenter,
|
blockContext.blockCenter,
|
||||||
icon = downIcon,
|
icon = downIcon,
|
||||||
rotateUV = { 0 },
|
rotateUV = { if (shouldRotateDown) 3 - idx else 0 },
|
||||||
postProcess = noPost
|
postProcess = noPost
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user