mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 03:05:28 +01:00
Handle negative Y in topo shader
This commit is contained in:
parent
9d1bca9922
commit
0d477db78b
@ -202,10 +202,12 @@ public class TopoHDShader implements HDShader {
|
|||||||
if (isHidden(blocktype)) {
|
if (isHidden(blocktype)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
int y = mapiter.getY();
|
||||||
|
if (y < 0) y = 0; // Clamp at zero for now
|
||||||
/* See if we're close to an edge */
|
/* See if we're close to an edge */
|
||||||
int[] xyz = ps.getSubblockCoord();
|
int[] xyz = ps.getSubblockCoord();
|
||||||
// Only color lines when spacing is matched
|
// Only color lines when spacing is matched
|
||||||
Color lcolor = ((ps.getMapIterator().getY() % linespacing) == 0)?linecolor:null;
|
Color lcolor = ((y % linespacing) == 0)?linecolor:null;
|
||||||
|
|
||||||
/* See which face we're on (only do lines on top face) */
|
/* See which face we're on (only do lines on top face) */
|
||||||
switch(ps.getLastBlockStep()) {
|
switch(ps.getLastBlockStep()) {
|
||||||
@ -229,7 +231,7 @@ public class TopoHDShader implements HDShader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
c.setColor(fillcolor[mapiter.getY() >> heightshift]);
|
c.setColor(fillcolor[y >> heightshift]);
|
||||||
inWater = false;
|
inWater = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -248,7 +250,7 @@ public class TopoHDShader implements HDShader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
c.setColor(fillcolor[mapiter.getY() >> heightshift]);
|
c.setColor(fillcolor[y >> heightshift]);
|
||||||
inWater = false;
|
inWater = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user