DebugEntrySimplePerformanceImpactors .java

net.minecraft.client.gui.components.debug.DebugEntrySimplePerformanceImpactors (class): members: isAllowed, serverOrClientLevel, displayer, clientChunk.

net.minecraft.client.gui.components.debugclass50 linesclient1.9 KB

Implements

API Surface (2)

void display(final DebugScreenDisplayer displayer, final @Nullable Level serverOrClientLevel, final @Nullable LevelChunk clientChunk, final @Nullable LevelChunk serverChunk)
boolean isAllowed(final boolean reducedDebugInfo)

Fields & Constants (3)

displayer
serverOrClientLevel
clientChunk

String literals (5)

"improved-transparency "
"fast-clouds "
"fancy-clouds "
"multidrawindirect"
"naive"

Full Source

DebugEntrySimplePerformanceImpactors.java50 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.gui.components.debug;
2
3
import java.util.Locale;
4
import net.fabricmc.api.EnvType;
5
import net.fabricmc.api.Environment;
6
import net.minecraft.client.CloudStatus;
7
import net.minecraft.client.Minecraft;
8
import net.minecraft.client.Options;
9
import net.minecraft.client.TextureFilteringMethod;
10
import net.minecraft.world.level.Level;
11
import net.minecraft.world.level.chunk.LevelChunk;
12
import org.jspecify.annotations.Nullable;
13
14
@Environment(EnvType.CLIENT)
15
public class DebugEntrySimplePerformanceImpactors implements DebugScreenEntry {
16
	@Override
17
	public void display(
18
		final DebugScreenDisplayer displayer,
19
		final @Nullable Level serverOrClientLevel,
20
		final @Nullable LevelChunk clientChunk,
21
		final @Nullable LevelChunk serverChunk
22
	) {
23
		Minecraft minecraft = Minecraft.getInstance();
24
		Options options = minecraft.options;
25
		displayer.addLine(
26
			String.format(
27
				Locale.ROOT,
28
				"%s%sB: %d",
29
				options.improvedTransparency().get() ? "improved-transparency " : "",
30
				options.cloudStatus().get() == CloudStatus.OFF ? "" : (options.cloudStatus().get() == CloudStatus.FAST ? "fast-clouds " : "fancy-clouds "),
31
				options.biomeBlendRadius().get()
32
			)
33
		);
34
		TextureFilteringMethod filteringMethod = options.textureFiltering().get();
35
		if (filteringMethod == TextureFilteringMethod.ANISOTROPIC) {
36
			displayer.addLine(String.format(Locale.ROOT, "Filtering: %s %dx", filteringMethod.caption().getString(), options.maxAnisotropyValue()));
37
		} else {
38
			displayer.addLine(String.format(Locale.ROOT, "Filtering: %s", filteringMethod.caption().getString()));
39
		}
40
41
		boolean isMultiDrawIndirect = minecraft.levelRenderer.isChunkRenderingUsingMultiDrawIndirect();
42
		displayer.addLine(String.format(Locale.ROOT, "Terrain Rendering: %s", isMultiDrawIndirect ? "multidrawindirect" : "naive"));
43
	}
44
45
	@Override
46
	public boolean isAllowed(final boolean reducedDebugInfo) {
47
		return true;
48
	}
49
}
50

Decompiled Minecraft 26.3 source of DebugEntrySimplePerformanceImpactors (net/minecraft/client/gui/components/debug/DebugEntrySimplePerformanceImpactors.java) with Mojang official mappings, stored verbatim on the site.