adding offset back
This commit is contained in:
@@ -29,6 +29,8 @@ import com.seibel.lod.core.util.ColorUtil;
|
||||
import com.seibel.lod.core.util.DataPointUtil;
|
||||
import com.seibel.lod.core.util.LodUtil;
|
||||
|
||||
import static com.seibel.lod.core.builders.lodBuilding.LodBuilder.MIN_WORLD_HEIGHT;
|
||||
|
||||
/**
|
||||
* Builds LODs as rectangular prisms.
|
||||
* @author James Seibel
|
||||
@@ -134,7 +136,7 @@ public class CubicLodTemplate
|
||||
color = vertexOptimizer.getColor(lodDirection);
|
||||
addPosAndColor(buffer,
|
||||
vertexOptimizer.getX(lodDirection, vertexIndex),
|
||||
vertexOptimizer.getY(lodDirection, vertexIndex, verticalFaceIndex),
|
||||
vertexOptimizer.getY(lodDirection, vertexIndex, verticalFaceIndex + MIN_WORLD_HEIGHT),
|
||||
vertexOptimizer.getZ(lodDirection, vertexIndex),
|
||||
color, skyLight, blockLight );
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ public class LodBuilder
|
||||
lightSky = (light >> 4) & 0b1111;
|
||||
isDefault = ((light >> 8)) == 1;
|
||||
|
||||
dataToMerge[index * verticalData + count] = DataPointUtil.createDataPoint(height, depth, color, lightSky, lightBlock, generation, isDefault);
|
||||
dataToMerge[index * verticalData + count] = DataPointUtil.createDataPoint(height - MIN_WORLD_HEIGHT, depth - MIN_WORLD_HEIGHT, color, lightSky, lightBlock, generation, isDefault);
|
||||
topBlock = false;
|
||||
yAbs = depth - 1;
|
||||
count++;
|
||||
|
||||
Reference in New Issue
Block a user