small fix to the tree cutter

This commit is contained in:
Leonardo
2021-08-23 11:24:06 +02:00
parent 9840c594e6
commit 38e323a12f
3 changed files with 8 additions and 2 deletions
@@ -585,6 +585,9 @@ public class LodRegion implements Serializable
*/
public LevelContainer getLevel(byte lod)
{
if(lod < minDetailLevel){
throw new IllegalArgumentException("getLevel asked for a level that does not exist: minimum " + minDetailLevel + " level requested " + lod);
}
return new LevelContainer(lod, colors[lod], height[lod], depth[lod], generationType[lod], dataExistence[lod]);
}
@@ -613,6 +616,7 @@ public class LodRegion implements Serializable
{
if(minDetailLevel < detailLevel)
{
System.out.println("cutting at " + regionPosX + " " + regionPosZ + " " + detailLevel);
for (byte tempLod = 0; tempLod < detailLevel; tempLod++)
{
colors[tempLod] = new byte[0][0][0];