mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-29 05:55:57 +01:00
Small debug dump improvements
This commit is contained in:
parent
f66695acf6
commit
59bd00734c
@ -33,6 +33,7 @@
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
@DebugDump
|
||||||
public class MinecraftVersion implements Comparable<MinecraftVersion> {
|
public class MinecraftVersion implements Comparable<MinecraftVersion> {
|
||||||
|
|
||||||
private static final Pattern VERSION_REGEX = Pattern.compile("(?:(?<major>\\d+)\\.(?<minor>\\d+))(?:\\.(?<patch>\\d+))?(?:\\-(?:pre|rc)\\d+)?");
|
private static final Pattern VERSION_REGEX = Pattern.compile("(?:(?<major>\\d+)\\.(?<minor>\\d+))(?:\\.(?<patch>\\d+))?(?:\\-(?:pre|rc)\\d+)?");
|
||||||
@ -41,10 +42,8 @@ public class MinecraftVersion implements Comparable<MinecraftVersion> {
|
|||||||
public static final MinecraftVersion EARLIEST_SUPPORTED = new MinecraftVersion(1, 12, 2);
|
public static final MinecraftVersion EARLIEST_SUPPORTED = new MinecraftVersion(1, 12, 2);
|
||||||
public static final MinecraftVersion THE_FLATTENING = new MinecraftVersion(1, 13);
|
public static final MinecraftVersion THE_FLATTENING = new MinecraftVersion(1, 13);
|
||||||
|
|
||||||
@DebugDump
|
|
||||||
private final int major, minor, patch;
|
private final int major, minor, patch;
|
||||||
|
|
||||||
@DebugDump
|
|
||||||
private final Lazy<MinecraftResource> resource;
|
private final Lazy<MinecraftResource> resource;
|
||||||
|
|
||||||
public MinecraftVersion(int major, int minor) {
|
public MinecraftVersion(int major, int minor) {
|
||||||
@ -142,6 +141,7 @@ public static MinecraftVersion of(String versionString) {
|
|||||||
return new MinecraftVersion(major, minor, patch);
|
return new MinecraftVersion(major, minor, patch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DebugDump
|
||||||
public enum MinecraftResource {
|
public enum MinecraftResource {
|
||||||
|
|
||||||
MC_1_12 (new MinecraftVersion(1, 12), "mc1_12", "https://launcher.mojang.com/v1/objects/0f275bc1547d01fa5f56ba34bdc87d981ee12daf/client.jar"),
|
MC_1_12 (new MinecraftVersion(1, 12), "mc1_12", "https://launcher.mojang.com/v1/objects/0f275bc1547d01fa5f56ba34bdc87d981ee12daf/client.jar"),
|
||||||
@ -152,9 +152,9 @@ public enum MinecraftResource {
|
|||||||
MC_1_16_2 (new MinecraftVersion(1, 16, 2), "mc1_16", "https://launcher.mojang.com/v1/objects/653e97a2d1d76f87653f02242d243cdee48a5144/client.jar"),
|
MC_1_16_2 (new MinecraftVersion(1, 16, 2), "mc1_16", "https://launcher.mojang.com/v1/objects/653e97a2d1d76f87653f02242d243cdee48a5144/client.jar"),
|
||||||
MC_1_17 (new MinecraftVersion(1, 17), "mc1_16", "https://launcher.mojang.com/v1/objects/1cf89c77ed5e72401b869f66410934804f3d6f52/client.jar");
|
MC_1_17 (new MinecraftVersion(1, 17), "mc1_16", "https://launcher.mojang.com/v1/objects/1cf89c77ed5e72401b869f66410934804f3d6f52/client.jar");
|
||||||
|
|
||||||
@DebugDump private final MinecraftVersion version;
|
private final MinecraftVersion version;
|
||||||
@DebugDump private final String resourcePrefix;
|
private final String resourcePrefix;
|
||||||
@DebugDump private final String clientUrl;
|
private final String clientUrl;
|
||||||
|
|
||||||
MinecraftResource(MinecraftVersion version, String resourcePrefix, String clientUrl) {
|
MinecraftResource(MinecraftVersion version, String resourcePrefix, String clientUrl) {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
|
@ -30,13 +30,13 @@
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@DebugDump
|
||||||
public class CoreConfig {
|
public class CoreConfig {
|
||||||
|
|
||||||
@DebugDump private boolean downloadAccepted = false;
|
private boolean downloadAccepted = false;
|
||||||
@DebugDump private int renderThreadCount = 0;
|
private int renderThreadCount = 0;
|
||||||
@DebugDump private boolean metricsEnabled = false;
|
private boolean metricsEnabled = false;
|
||||||
@DebugDump private File dataFolder = new File("data");
|
private File dataFolder = new File("data");
|
||||||
|
|
||||||
|
|
||||||
public CoreConfig(ConfigurationNode node) throws IOException {
|
public CoreConfig(ConfigurationNode node) throws IOException {
|
||||||
|
|
||||||
|
@ -183,4 +183,14 @@ public boolean equals(Object obj) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "BmMap{" +
|
||||||
|
"id='" + id + '\'' +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", world=" + world +
|
||||||
|
", fileRoot=" + fileRoot +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -423,4 +423,13 @@ public static Vector2i blockToChunk(Vector3i pos) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "MCAWorld{" +
|
||||||
|
"uuid=" + uuid +
|
||||||
|
", worldFolder=" + worldFolder +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user