"/" instead of "."

This commit is contained in:
CreepyCre 2021-02-10 13:54:48 +01:00
parent 25bc8caeab
commit 81a0f0cbd1

View file

@ -66,7 +66,7 @@ public class SchematicV2Handler {
public Tag readNbtFromJson(String id) { public Tag readNbtFromJson(String id) {
try { try {
Path path = Paths.get(SchematicV2Handler.class.getResource("/data/dimdoors/pockets/json/" + id.replaceAll("\\.", "/") + ".json").toURI()); Path path = Paths.get(SchematicV2Handler.class.getResource("/data/dimdoors/pockets/json/" + id + ".json").toURI());
if (!Files.isRegularFile(path)) return null; if (!Files.isRegularFile(path)) return null;
try { try {
JsonElement json = GSON.fromJson(String.join("", Files.readAllLines(path)), JsonElement.class); JsonElement json = GSON.fromJson(String.join("", Files.readAllLines(path)), JsonElement.class);