Class MycelDump
java.lang.Object
my.celium.org.diag.MycelDump
/mycel dump: one JSON report with versions, every loaded mod, each
Mycel mod's config and the tail of logs/latest.log. It is always
saved to mycel-dumps/ and, unless allowDumpUploads is off in
mycel.json, uploaded to pastes.dev and opened with the viewer at
VIEWER.
IP addresses, access tokens and the OS home folder are removed before anything leaves the machine. Pastes are public to anyone with the link.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intBumped when the JSON shape changes incompatibly; the viewer reads it.static final StringViewer base; the paste key is appended. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.gson.JsonObjectcollect(net.minecraft.server.MinecraftServer server) Builds the report.static longSeconds left before another upload is allowed,0when ready.static StringRemoves IP addresses, tokens and the OS home folder (which names the OS user).static PathWrites the report to<game dir>/mycel-dumps/dump-<time>.jsonand returns the path.static voidsetUploadsEnabled(boolean enabled) Called byMycelfrom the global config; mods should not call this.static StringtoJson(com.google.gson.JsonObject dump) Pretty JSON text of a report.static CompletableFuture<String> Uploads to pastes.dev off the game thread.static booleanstatic StringViewer link for a paste key.
-
Field Details
-
VIEWER
-
FORMAT_VERSION
public static final int FORMAT_VERSIONBumped when the JSON shape changes incompatibly; the viewer reads it.- See Also:
-
-
Method Details
-
setUploadsEnabled
public static void setUploadsEnabled(boolean enabled) Called byMycelfrom the global config; mods should not call this. -
uploadsEnabled
public static boolean uploadsEnabled() -
cooldownSeconds
public static long cooldownSeconds()Seconds left before another upload is allowed,0when ready. -
collect
public static com.google.gson.JsonObject collect(net.minecraft.server.MinecraftServer server) Builds the report. Call on the server thread: it reads live config values. -
redact
-
toJson
Pretty JSON text of a report. -
save
Writes the report to<game dir>/mycel-dumps/dump-<time>.jsonand returns the path.- Throws:
IOException
-
upload
Uploads to pastes.dev off the game thread. Completes with the paste key, or exceptionally with a short, player-readable message. -
viewerUrl
-