When that issue is fixed, this commit can be reverted.
This commit is contained in:
Blue (Lukas Rieger) 2021-06-09 13:54:14 +02:00
parent dadc882ef2
commit 0e1e4056bb
No known key found for this signature in database
GPG Key ID: 904C4995F9E1F800
3 changed files with 5 additions and 5 deletions

View File

@ -151,7 +151,7 @@ public void load(BlueMapAPI api, ConfigurationNode markerNode, boolean overwrite
this.shape = readShape(markerNode.node("shape"));
this.shapeMinY = markerNode.node("shapeMinY").getFloat(0);
this.shapeMaxY = markerNode.node("shapeMaxY").getFloat(255);
this.shapeMaxY = (float) markerNode.node("shapeMaxY").getDouble(255);
this.depthTest = markerNode.node("depthTest").getBoolean(true);
this.lineWidth = markerNode.node("lineWidth").getInt(2);
this.lineColor = readColor(markerNode.node("lineColor"));
@ -208,7 +208,7 @@ private static Color readColor(ConfigurationNode node) throws MarkerFileFormatEx
if (nr.virtual() || ng.virtual() || nb.virtual()) throw new MarkerFileFormatException("Failed to read color: Node r,g or b is not set!");
float alpha = na.getFloat(1);
float alpha = (float) na.getDouble(1);
if (alpha < 0 || alpha > 1) throw new MarkerFileFormatException("Failed to read color: alpha value out of range (0-1)!");
try {

View File

@ -173,7 +173,7 @@ private static Color readColor(ConfigurationNode node) throws MarkerFileFormatEx
if (nr.virtual() || ng.virtual() || nb.virtual()) throw new MarkerFileFormatException("Failed to read color: Node r,g or b is not set!");
float alpha = na.getFloat(1);
float alpha = (float) na.getDouble(1);
if (alpha < 0 || alpha > 1) throw new MarkerFileFormatException("Failed to read color: alpha value out of range (0-1)!");
try {

View File

@ -142,7 +142,7 @@ public void load(BlueMapAPI api, ConfigurationNode markerNode, boolean overwrite
this.hasUnsavedChanges = false;
this.shape = readShape(markerNode.node("shape"));
this.shapeY = markerNode.node("shapeY").getFloat(markerNode.node("height").getFloat(64)); // fallback to deprecated "height"
this.shapeY = (float) markerNode.node("shapeY").getDouble(markerNode.node("height").getDouble(64)); // fallback to deprecated "height"
this.depthTest = markerNode.node("depthTest").getBoolean(true);
this.lineWidth = markerNode.node("lineWidth").getInt(2);
@ -202,7 +202,7 @@ private static Color readColor(ConfigurationNode node) throws MarkerFileFormatEx
if (nr.virtual() || ng.virtual() || nb.virtual()) throw new MarkerFileFormatException("Failed to read color: Node r,g or b is not set!");
float alpha = na.getFloat(1);
float alpha = (float) na.getDouble(1);
if (alpha < 0 || alpha > 1) throw new MarkerFileFormatException("Failed to read color: alpha value out of range (0-1)!");
try {