Skip to content

Commit

Permalink
Fix empty profile bug
Browse files Browse the repository at this point in the history
BiomeProfile.mt files were malformed when written in locales that use ',' for the decimal separator.
  • Loading branch information
Treer committed Apr 26, 2018
1 parent 7c382bf commit 788e051
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.Map.Entry;

import amidst.documentation.GsonConstructor;
Expand Down Expand Up @@ -162,7 +163,7 @@ private String serialize() {
private String serializeColorMap() {
String output = "";
for (MinetestBiome biome : biomeList) {
output += String.format(" { \"name\": \"%s\", \"color\": %s, \"y_min\": %d, \"y_max\": %d, \"heat_point\": %.2f, \"humidity_point\": %.2f },\r\n",
output += String.format(Locale.ROOT, " { \"name\": \"%s\", \"color\": %s, \"y_min\": %d, \"y_max\": %d, \"heat_point\": %.2f, \"humidity_point\": %.2f },\r\n",
biome.getName(),
biome.getDefaultColor().createBiomeColorJson().toString(),
biome.y_min, biome.y_max,
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/amidst/metadata.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project.build.sourceEncoding=UTF-8
amidst.build.jdk.version=1.8
amidst.build.filename=amidstest-v1-0-beta3
amidst.build.filename=amidstest-v1-0-beta4

amidst.version.major=1
amidst.version.minor=0
amidst.version.preReleaseSuffix=beta3
amidst.version.preReleaseSuffix=beta4

0 comments on commit 788e051

Please sign in to comment.