Re-Introduced HEIGHMAP mode correctly.
Added single get and add to the LevelContainer to avoid using temp arrays
This commit is contained in:
@@ -34,12 +34,26 @@ public class VerticalLevelContainer implements LevelContainer
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean addSingleData(long newData, int posX, int posZ){
|
||||
posX = LevelPosUtil.getRegionModule(detailLevel, posX);
|
||||
posZ = LevelPosUtil.getRegionModule(detailLevel, posZ);
|
||||
dataContainer[posX][posZ][0] = newData;
|
||||
return true;
|
||||
}
|
||||
|
||||
public long[] getData(int posX, int posZ){
|
||||
posX = LevelPosUtil.getRegionModule(detailLevel, posX);
|
||||
posZ = LevelPosUtil.getRegionModule(detailLevel, posZ);
|
||||
return dataContainer[posX][posZ];
|
||||
}
|
||||
|
||||
public long getSingleData(int posX, int posZ){
|
||||
posX = LevelPosUtil.getRegionModule(detailLevel, posX);
|
||||
posZ = LevelPosUtil.getRegionModule(detailLevel, posZ);
|
||||
//Improve this using a thread map to long[]
|
||||
return dataContainer[posX][posZ][0];
|
||||
}
|
||||
|
||||
public boolean doesItExist(int posX, int posZ){
|
||||
long[] data = getData(posX,posZ);
|
||||
if(data == null)
|
||||
|
||||
Reference in New Issue
Block a user