mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-26 04:25:31 +01:00
Workaround for SpongePowered/Configurate#206
When that issue is fixed, this commit can be reverted.
This commit is contained in:
parent
dadc882ef2
commit
0e1e4056bb
@ -151,7 +151,7 @@ public void load(BlueMapAPI api, ConfigurationNode markerNode, boolean overwrite
|
|||||||
|
|
||||||
this.shape = readShape(markerNode.node("shape"));
|
this.shape = readShape(markerNode.node("shape"));
|
||||||
this.shapeMinY = markerNode.node("shapeMinY").getFloat(0);
|
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.depthTest = markerNode.node("depthTest").getBoolean(true);
|
||||||
this.lineWidth = markerNode.node("lineWidth").getInt(2);
|
this.lineWidth = markerNode.node("lineWidth").getInt(2);
|
||||||
this.lineColor = readColor(markerNode.node("lineColor"));
|
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!");
|
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)!");
|
if (alpha < 0 || alpha > 1) throw new MarkerFileFormatException("Failed to read color: alpha value out of range (0-1)!");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -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!");
|
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)!");
|
if (alpha < 0 || alpha > 1) throw new MarkerFileFormatException("Failed to read color: alpha value out of range (0-1)!");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -142,7 +142,7 @@ public void load(BlueMapAPI api, ConfigurationNode markerNode, boolean overwrite
|
|||||||
this.hasUnsavedChanges = false;
|
this.hasUnsavedChanges = false;
|
||||||
|
|
||||||
this.shape = readShape(markerNode.node("shape"));
|
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.depthTest = markerNode.node("depthTest").getBoolean(true);
|
||||||
this.lineWidth = markerNode.node("lineWidth").getInt(2);
|
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!");
|
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)!");
|
if (alpha < 0 || alpha > 1) throw new MarkerFileFormatException("Failed to read color: alpha value out of range (0-1)!");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user