Skip to content

Commit

Permalink
Fix minY/maxY calculation (closes #66)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Mar 27, 2020
1 parent cb8341a commit 48bf44c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TileGenerator.cpp
Expand Up @@ -563,7 +563,7 @@ void TileGenerator::renderMapBlock(const BlockDecoder &blk, const BlockPos &pos)
int xBegin = (pos.x - m_xMin) * 16;
int zBegin = (m_zMax - pos.z) * 16;
int minY = (pos.y * 16 > m_yMin) ? 0 : m_yMin - pos.y * 16;
int maxY = (pos.y * 16 < m_yMax) ? 15 : m_yMax - pos.y * 16;
int maxY = (pos.y * 16 + 15 < m_yMax) ? 15 : m_yMax - pos.y * 16;
for (int z = 0; z < 16; ++z) {
int imageY = zBegin + 15 - z;
for (int x = 0; x < 16; ++x) {
Expand Down

0 comments on commit 48bf44c

Please sign in to comment.