Fix biome rendering
This commit is contained in:
parent
b72cc2063a
commit
57ea6aefd6
5 changed files with 25 additions and 8 deletions
|
|
@ -46,9 +46,9 @@ public abstract class MapTile {
|
||||||
|
|
||||||
public abstract String getKey();
|
public abstract String getKey();
|
||||||
|
|
||||||
public boolean isBiomeDataNeeded() { return false; }
|
public abstract boolean isBiomeDataNeeded();
|
||||||
public boolean isHightestBlockYDataNeeded() { return false; }
|
public abstract boolean isHightestBlockYDataNeeded();
|
||||||
public boolean isRawBiomeDataNeeded() { return false; }
|
public abstract boolean isRawBiomeDataNeeded();
|
||||||
public boolean isBlockTypeDataNeeded() { return true; }
|
public abstract boolean isBlockTypeDataNeeded();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -498,7 +498,9 @@ public class FlatMap extends MapType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isHightestBlockYDataNeeded() { return true; }
|
public boolean isHightestBlockYDataNeeded() { return true; }
|
||||||
|
public boolean isBiomeDataNeeded() { return false; }
|
||||||
|
public boolean isRawBiomeDataNeeded() { return false; }
|
||||||
|
public boolean isBlockTypeDataNeeded() { return true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -330,9 +330,13 @@ public class IsoHDPerspective implements HDPerspective {
|
||||||
}
|
}
|
||||||
double mtend = Math.min(t_next_x, Math.min(t_next_y, t_next_z));
|
double mtend = Math.min(t_next_x, Math.min(t_next_y, t_next_z));
|
||||||
while(mt < mtend) {
|
while(mt < mtend) {
|
||||||
if(model[modscale*modscale*my + modscale*mz + mx] > 0) {
|
try {
|
||||||
return false;
|
if(model[modscale*modscale*my + modscale*mz + mx] > 0) {
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
} catch (ArrayIndexOutOfBoundsException aioobx) { /* We're outside the model, so miss */
|
||||||
|
return true;
|
||||||
|
}
|
||||||
/* If X step is next best */
|
/* If X step is next best */
|
||||||
if((mt_next_x <= mt_next_y) && (mt_next_x <= mt_next_z)) {
|
if((mt_next_x <= mt_next_y) && (mt_next_x <= mt_next_z)) {
|
||||||
mx += x_inc;
|
mx += x_inc;
|
||||||
|
|
|
||||||
|
|
@ -86,4 +86,10 @@ public class KzedMapTile extends MapTile {
|
||||||
public MapTile[] getAdjecentTiles() {
|
public MapTile[] getAdjecentTiles() {
|
||||||
return map.getAdjecentTiles(this);
|
return map.getAdjecentTiles(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isBiomeDataNeeded() { return map.isBiomeDataNeeded(); }
|
||||||
|
public boolean isHightestBlockYDataNeeded() { return false; }
|
||||||
|
public boolean isRawBiomeDataNeeded() { return map.isRawBiomeDataNeeded(); }
|
||||||
|
public boolean isBlockTypeDataNeeded() { return true; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,4 +98,9 @@ public class KzedZoomedMapTile extends MapTile {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isBiomeDataNeeded() { return originalTile.isBiomeDataNeeded(); }
|
||||||
|
public boolean isHightestBlockYDataNeeded() { return false; }
|
||||||
|
public boolean isRawBiomeDataNeeded() { return originalTile.isRawBiomeDataNeeded(); }
|
||||||
|
public boolean isBlockTypeDataNeeded() { return true; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue