voxelImprovements #5
@ -44,16 +44,23 @@ public class ChunkData {
|
|||||||
*/
|
*/
|
||||||
int worldZ;
|
int worldZ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The stride of the data
|
||||||
|
*/
|
||||||
|
int stride;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a chunk data
|
* Creates a chunk data
|
||||||
* @param worldX The word x coordinate
|
* @param worldX The word x coordinate
|
||||||
* @param worldY The word y coordinate
|
* @param worldY The word y coordinate
|
||||||
* @param worldZ The word z 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.worldX = worldX;
|
||||||
this.worldY = worldY;
|
this.worldY = worldY;
|
||||||
this.worldZ = worldZ;
|
this.worldZ = worldZ;
|
||||||
|
this.stride = stride;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -216,5 +223,13 @@ public class ChunkData {
|
|||||||
return new Vector3i(worldX,worldY,worldZ);
|
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.setVoxelType(values);
|
||||||
data.setVoxelWeight(weights);
|
data.setVoxelWeight(weights);
|
||||||
terrainCache.addChunkDataToCache(
|
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.setVoxelType(values);
|
||||||
data.setVoxelWeight(weights);
|
data.setVoxelWeight(weights);
|
||||||
terrainCache.addChunkDataToCache(
|
terrainCache.addChunkDataToCache(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user