forked from mirror/BlueMap
Merge branch 'master' of https://github.com/BlueMap-Minecraft/BlueMap
This commit is contained in:
commit
2689cd10e0
@ -140,13 +140,16 @@ public void write(JsonWriter out, TextureVariable value) throws IOException {
|
||||
public TextureVariable read(JsonReader in) throws IOException {
|
||||
String value = in.nextString();
|
||||
if (value.isEmpty()) throw new IOException("Can't parse an empty String into a TextureVariable");
|
||||
|
||||
if (value.charAt(0) == '#') {
|
||||
return new TextureVariable(value.substring(1));
|
||||
} else {
|
||||
if (!(value.contains(":") || value.contains("/"))) {
|
||||
return new TextureVariable(value);
|
||||
}
|
||||
|
||||
return new TextureVariable(new ResourcePath<>(value));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user