chunk data stride tracking
This commit is contained in:
parent
db2886c0c7
commit
c80c8e5b71
@ -44,16 +44,23 @@ public class ChunkData {
|
||||
*/
|
||||
int worldZ;
|
||||
|
||||
/**
|
||||
* The stride of the data
|
||||
*/
|
||||
int stride;
|
||||
|
||||
/**
|
||||
* Creates a chunk data
|
||||
* @param worldX The word x coordinate
|
||||
* @param worldY The word y coordinate
|
||||
* @param worldZ The word z coordinate
|
||||
* @param stride The stride of the data
|
||||
*/
|
||||
public ChunkData(int worldX, int worldY, int worldZ){
|
||||
public ChunkData(int worldX, int worldY, int worldZ, int stride){
|
||||
this.worldX = worldX;
|
||||
this.worldY = worldY;
|
||||
this.worldZ = worldZ;
|
||||
this.stride = stride;
|
||||
}
|
||||
|
||||
|
||||
@ -216,5 +223,13 @@ public class ChunkData {
|
||||
return new Vector3i(worldX,worldY,worldZ);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the stride of the data
|
||||
* @return The stride of the data
|
||||
*/
|
||||
public int getStride(){
|
||||
return stride;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ public class ClientTerrainManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
ChunkData data = new ChunkData(message.getworldX(), message.getworldY(), message.getworldZ());
|
||||
ChunkData data = new ChunkData(message.getworldX(), message.getworldY(), message.getworldZ(), ChunkData.NO_STRIDE);
|
||||
data.setVoxelType(values);
|
||||
data.setVoxelWeight(weights);
|
||||
terrainCache.addChunkDataToCache(
|
||||
@ -127,7 +127,7 @@ public class ClientTerrainManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
ChunkData data = new ChunkData(message.getworldX(), message.getworldY(), message.getworldZ());
|
||||
ChunkData data = new ChunkData(message.getworldX(), message.getworldY(), message.getworldZ(), message.getchunkResolution());
|
||||
data.setVoxelType(values);
|
||||
data.setVoxelWeight(weights);
|
||||
terrainCache.addChunkDataToCache(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user