mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-01-11 18:37:40 +01:00
Merge pull request #3866 from IMBArator/fix_locale_issue_ModelBlockModelImpl.getLine
fix locale issue in ModelBlockModelImpl getLine (closes: #3854)
This commit is contained in:
commit
9a8ef557af
@ -3,6 +3,7 @@ package org.dynmap.modsupport.impl;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import org.dynmap.modsupport.BlockSide;
|
import org.dynmap.modsupport.BlockSide;
|
||||||
import org.dynmap.modsupport.ModelBlockModel;
|
import org.dynmap.modsupport.ModelBlockModel;
|
||||||
@ -69,16 +70,16 @@ public class ModelBlockModelImpl extends BlockModelImpl implements ModelBlockMod
|
|||||||
String line;
|
String line;
|
||||||
line = String.format("modellist:%s", ids);
|
line = String.format("modellist:%s", ids);
|
||||||
for (ModelBlockImpl mb: boxes) {
|
for (ModelBlockImpl mb: boxes) {
|
||||||
line += String.format(",box=%f/%f/%f", mb.from[0], mb.from[1], mb.from[2]);
|
line += String.format(Locale.US, ",box=%f/%f/%f", mb.from[0], mb.from[1], mb.from[2]);
|
||||||
if (!mb.shade) { // if shade=false
|
if (!mb.shade) { // if shade=false
|
||||||
line += "/false";
|
line += "/false";
|
||||||
}
|
}
|
||||||
line += String.format(":%f/%f/%f", mb.to[0], mb.to[1], mb.to[2]);
|
line += String.format(Locale.US, ":%f/%f/%f", mb.to[0], mb.to[1], mb.to[2]);
|
||||||
if ((mb.xrot != 0) || (mb.yrot != 0) || (mb.zrot != 0)) { // If needed, add rotation
|
if ((mb.xrot != 0) || (mb.yrot != 0) || (mb.zrot != 0)) { // If needed, add rotation
|
||||||
line += String.format("/%f/%f/%f", mb.xrot, mb.yrot, mb.zrot);
|
line += String.format(Locale.US, "/%f/%f/%f", mb.xrot, mb.yrot, mb.zrot);
|
||||||
// If origin also defined, add it
|
// If origin also defined, add it
|
||||||
if (mb.rotorigin != null) {
|
if (mb.rotorigin != null) {
|
||||||
line += String.format("/%f/%f/%f", mb.rotorigin[0], mb.rotorigin[1], mb.rotorigin[2]);
|
line += String.format(Locale.US, "/%f/%f/%f", mb.rotorigin[0], mb.rotorigin[1], mb.rotorigin[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (BlockSide bs : fromBlockSide.keySet()) {
|
for (BlockSide bs : fromBlockSide.keySet()) {
|
||||||
@ -101,7 +102,7 @@ public class ModelBlockModelImpl extends BlockModelImpl implements ModelBlockMod
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (mside.uv != null) {
|
if (mside.uv != null) {
|
||||||
line += String.format(":%s/%d/%f/%f/%f/%f", rval, mside.textureid, mside.uv[0], mside.uv[1], mside.uv[2], mside.uv[3]);
|
line += String.format(Locale.US, ":%s/%d/%f/%f/%f/%f", rval, mside.textureid, mside.uv[0], mside.uv[1], mside.uv[2], mside.uv[3]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
line += String.format(":%s/%d", rval, mside.textureid);
|
line += String.format(":%s/%d", rval, mside.textureid);
|
||||||
|
Loading…
Reference in New Issue
Block a user