mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
update
This commit is contained in:
@@ -213,8 +213,8 @@ public class ConsoleCommandInterpreter {
|
||||
for (PointOfInterestData poi : data.getPointsOfInterest())
|
||||
poiNames.add(poi.name + " - " + poi.type);
|
||||
}
|
||||
String poi = "POI Names - Types\n" + String.join("\n", poiNames);
|
||||
return poi;
|
||||
System.out.println("POI Names - Types\n" + String.join("\n", poiNames));
|
||||
return "POI lists dumped to stdout.";
|
||||
});
|
||||
registerCommand(new String[]{"setColorID"}, s -> {
|
||||
if (s.length < 1)
|
||||
|
||||
@@ -452,7 +452,7 @@ public class World implements Disposable, SaveFileContent {
|
||||
biomeIndex2++;
|
||||
for (PointOfInterestData poi : biome.getPointsOfInterest()) {
|
||||
for (int i = 0; i < poi.count; i++) {
|
||||
for (int counter = 0; counter < 1000; counter++)//tries 1000 times to find a free point
|
||||
for (int counter = 0; counter < 500; counter++)//tries 500 times to find a free point
|
||||
{
|
||||
float radius = (float) Math.sqrt(((random.nextDouble()) / 2 * poi.radiusFactor));
|
||||
float theta = (float) (random.nextDouble() * 2 * Math.PI);
|
||||
@@ -502,7 +502,7 @@ public class World implements Disposable, SaveFileContent {
|
||||
}
|
||||
}
|
||||
if (!foundSolution) {
|
||||
if (counter == 999) {
|
||||
if (counter == 499) {
|
||||
System.err.print("Can not place POI " + poi.name + "...Rerunning..\n");
|
||||
running = true;
|
||||
}
|
||||
@@ -533,7 +533,6 @@ public class World implements Disposable, SaveFileContent {
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user