mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-09 09:16:34 +00:00
Fix up issues with code
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
This commit is contained in:
@@ -23,6 +23,14 @@ public class TerraWorld {
|
||||
private final WorldConfig worldConfig;
|
||||
private boolean safe;
|
||||
|
||||
public static void loadWorld(WorldConfig w) {
|
||||
loaded.put(w.getWorldID(), w);
|
||||
}
|
||||
|
||||
public static synchronized TerraWorld getWorld(World w) {
|
||||
return map.computeIfAbsent(w, TerraWorld::new);
|
||||
}
|
||||
|
||||
private TerraWorld(World w) {
|
||||
safe = true;
|
||||
worldConfig = loaded.get(w.getName());
|
||||
@@ -31,7 +39,7 @@ public class TerraWorld {
|
||||
for(int i = 0; i < config.biomeList.size(); i++) {
|
||||
String partName = config.biomeList.get(i);
|
||||
try {
|
||||
if(partName.startsWith("BIOME:")) {
|
||||
if (partName.startsWith("BIOME:")) {
|
||||
UserDefinedBiome[][] temp = new UserDefinedBiome[1][1];
|
||||
UserDefinedBiome b = config.getBiomes().get(partName.substring(6)).getBiome();
|
||||
temp[0][0] = b;
|
||||
@@ -78,14 +86,6 @@ public class TerraWorld {
|
||||
grid = new TerraBiomeGrid(w, config.freq1, config.freq2, zone, config, erosion);
|
||||
}
|
||||
|
||||
public static void loadWorld(WorldConfig w) {
|
||||
loaded.put(w.getWorldID(), w);
|
||||
}
|
||||
|
||||
public static synchronized TerraWorld getWorld(World w) {
|
||||
return map.computeIfAbsent(w, TerraWorld::new);
|
||||
}
|
||||
|
||||
public static synchronized void invalidate() {
|
||||
map.clear();
|
||||
for(WorldConfig config : loaded.values()) {
|
||||
|
||||
Reference in New Issue
Block a user