Fix cloud debug colors
This commit is contained in:
+13
-9
@@ -195,6 +195,15 @@ public class CloudRenderHandler
|
|||||||
|
|
||||||
// this color is changed at render time based on the level time
|
// this color is changed at render time based on the level time
|
||||||
Color color = new Color(255,255,255,255);
|
Color color = new Color(255,255,255,255);
|
||||||
|
if (DEBUG_BORDER_COLORS)
|
||||||
|
{
|
||||||
|
// equals is included so the boarder is 2 blocks wide, making it easier to see
|
||||||
|
if (x <= 1) { color = Color.RED; }
|
||||||
|
else if (x >= textureWidth - 2) { color = Color.GREEN; }
|
||||||
|
if (z <= 1) { color = Color.BLUE; }
|
||||||
|
else if (z >= textureWidth - 2) { color = Color.BLACK; }
|
||||||
|
}
|
||||||
|
|
||||||
DhApiRenderableBox box = new DhApiRenderableBox(
|
DhApiRenderableBox box = new DhApiRenderableBox(
|
||||||
new DhApiVec3d(minXBlockPos, 0, minZBlockPos),
|
new DhApiVec3d(minXBlockPos, 0, minZBlockPos),
|
||||||
new DhApiVec3d(maxXBlockPos, CLOUD_BOX_THICKNESS, maxZBlockPos),
|
new DhApiVec3d(maxXBlockPos, CLOUD_BOX_THICKNESS, maxZBlockPos),
|
||||||
@@ -281,21 +290,16 @@ public class CloudRenderHandler
|
|||||||
// FIXME transparency sorting makes having transparent clouds impossible
|
// FIXME transparency sorting makes having transparent clouds impossible
|
||||||
// maybe someday we could add the option to cull individual faces? a single bit for each direction should be enough
|
// maybe someday we could add the option to cull individual faces? a single bit for each direction should be enough
|
||||||
|
|
||||||
|
// if debug colors are enabled don't change them
|
||||||
|
if (!DEBUG_BORDER_COLORS)
|
||||||
|
{
|
||||||
// cloud color changes based on the time of day and weather so we need to get it from the level
|
// cloud color changes based on the time of day and weather so we need to get it from the level
|
||||||
Color cloudColor = this.level.getClientLevelWrapper().getCloudColor(renderParam.partialTicks);
|
Color cloudColor = this.level.getClientLevelWrapper().getCloudColor(renderParam.partialTicks);
|
||||||
if (DEBUG_BORDER_COLORS)
|
|
||||||
{
|
|
||||||
// equals is included so the board is 2 blocks wide, it makes it easier to see
|
|
||||||
if (cloudParams.instanceOffsetX <= 1) { cloudColor = Color.RED; }
|
|
||||||
else if (cloudParams.instanceOffsetX >= cloudParams.textureWidth - 2) { cloudColor = Color.GREEN; }
|
|
||||||
if (cloudParams.instanceOffsetZ <= 1) { cloudColor = Color.BLUE; }
|
|
||||||
else if (cloudParams.instanceOffsetZ >= cloudParams.textureWidth - 2) { cloudColor = Color.BLACK; }
|
|
||||||
}
|
|
||||||
|
|
||||||
for (DhApiRenderableBox box : boxGroup)
|
for (DhApiRenderableBox box : boxGroup)
|
||||||
{
|
{
|
||||||
box.color = cloudColor;
|
box.color = cloudColor;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
boxGroup.triggerBoxChange();
|
boxGroup.triggerBoxChange();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user