code cleanup
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2025-05-23 17:54:40 -04:00
parent 56746df5ac
commit 456036c0d2
2 changed files with 10 additions and 19 deletions

View File

@ -25,52 +25,52 @@ public class BlockChunkCache {
/**
* The size of the cache
*/
int cacheSize = CACHE_SIZE;
private int cacheSize = CACHE_SIZE;
/**
* The map of full res chunk key -> chunk data
*/
Map<Long,BlockChunkData> cacheMapFullRes = new HashMap<Long,BlockChunkData>();
private Map<Long,BlockChunkData> cacheMapFullRes = new HashMap<Long,BlockChunkData>();
/**
* The map of half res chunk key -> chunk data
*/
Map<Long,BlockChunkData> cacheMapHalfRes = new HashMap<Long,BlockChunkData>();
private Map<Long,BlockChunkData> cacheMapHalfRes = new HashMap<Long,BlockChunkData>();
/**
* The map of quarter res chunk key -> chunk data
*/
Map<Long,BlockChunkData> cacheMapQuarterRes = new HashMap<Long,BlockChunkData>();
private Map<Long,BlockChunkData> cacheMapQuarterRes = new HashMap<Long,BlockChunkData>();
/**
* The map of eighth res chunk key -> chunk data
*/
Map<Long,BlockChunkData> cacheMapEighthRes = new HashMap<Long,BlockChunkData>();
private Map<Long,BlockChunkData> cacheMapEighthRes = new HashMap<Long,BlockChunkData>();
/**
* The map of sixteenth res chunk key -> chunk data
*/
Map<Long,BlockChunkData> cacheMapSixteenthRes = new HashMap<Long,BlockChunkData>();
private Map<Long,BlockChunkData> cacheMapSixteenthRes = new HashMap<Long,BlockChunkData>();
/**
* Tracks how recently a chunk has been queries for (used for evicting old chunks from cache)
*/
List<Long> queryRecencyQueue = new LinkedList<Long>();
private List<Long> queryRecencyQueue = new LinkedList<Long>();
/**
* Tracks what chunks are already queued to be asynchronously loaded. Used so we don't have two threads generating/fetching the same chunk
*/
Map<Long, Boolean> queuedChunkMap = new HashMap<Long,Boolean>();
private Map<Long, Boolean> queuedChunkMap = new HashMap<Long,Boolean>();
/**
* The lock for thread safety
*/
ReentrantLock lock = new ReentrantLock();
private ReentrantLock lock = new ReentrantLock();
/**
* The disk map
*/
ServerBlockChunkDiskMap chunkDiskMap;
private ServerBlockChunkDiskMap chunkDiskMap;
/**
* Constructor

View File

@ -125,13 +125,6 @@ public class TownLayout {
Road.createRoad(macroData, leftNodeLoc, centerNodeLoc);
Road.createRoad(macroData, downNodeLoc, centerNodeLoc);
//
//place structures along roads
// TownLayout.generateStructuresAlongRoad(realm, town, upRoad, allowedStructures);
// TownLayout.generateStructuresAlongRoad(realm, town, rightRoad, allowedStructures);
// TownLayout.generateStructuresAlongRoad(realm, town, leftRoad, allowedStructures);
// TownLayout.generateStructuresAlongRoad(realm, town, downRoad, allowedStructures);
//
@ -169,7 +162,6 @@ public class TownLayout {
//build road and structures between curr and next node
if(closedSet.contains(newHash)){
Road.createRoad(macroData, nearPoint, currPoint);
// TownLayout.generateStructuresAlongRoad(realm, town, newRoad, allowedStructures);
}
}
}
@ -212,7 +204,6 @@ public class TownLayout {
//build road and structures between curr and next node
if(closedSet.contains(newHash)){
// Road newRoad = Road.createRoad(macroData, nearPoint, currPoint);
TownLayout.generateStructuresAlongRoad(realm, town, nearPoint, currPoint, Road.DEFAULT_RADIUS, allowedStructures);
}
}