API Surface (1) void send(final TelemetryEventSender eventSender)
Fields & Constants (2) newWorld
worldLoadDuration
Code Graph: Dependencies (3) Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.
Full Source
WorldLoadTimesEvent.java 30 lines · Minecraft 26.3 · verbatim Copy
1 package net.minecraft.client.telemetry.events;
2
3 import java.time.Duration;
4 import net.fabricmc.api.EnvType;
5 import net.fabricmc.api.Environment;
6 import net.minecraft.client.telemetry.TelemetryEventSender;
7 import net.minecraft.client.telemetry.TelemetryEventType;
8 import net.minecraft.client.telemetry.TelemetryProperty;
9 import org.jspecify.annotations.Nullable;
10
11 @Environment(EnvType.CLIENT)
12 public class WorldLoadTimesEvent {
13 private final boolean newWorld;
14 private final @Nullable Duration worldLoadDuration;
15
16 public WorldLoadTimesEvent(final boolean newWorld, final @Nullable Duration worldLoadDuration) {
17 this.worldLoadDuration = worldLoadDuration;
18 this.newWorld = newWorld;
19 }
20
21 public void send(final TelemetryEventSender eventSender) {
22 if (this.worldLoadDuration != null) {
23 eventSender.send(TelemetryEventType.WORLD_LOAD_TIMES, event -> {
24 event.put(TelemetryProperty.WORLD_LOAD_TIME_MS, (int)this.worldLoadDuration.toMillis());
25 event.put(TelemetryProperty.NEW_WORLD, this.newWorld);
26 });
27 }
28 }
29 }
30
Decompiled Minecraft 26.3 source of WorldLoadTimesEvent (net/minecraft/client/telemetry/events/WorldLoadTimesEvent.java) with Mojang official mappings, stored verbatim on the site.