DebugEntrySoundMood .java

net.minecraft.client.gui.components.debug.DebugEntrySoundMood (class): members: serverOrClientLevel, displayer, clientChunk, display. imports: LevelChunk.

net.minecraft.client.gui.components.debugclass28 linesclient895 B

Implements

API Surface (1)

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

Fields & Constants (3)

displayer
serverOrClientLevel
clientChunk

Code Graph: Dependencies (5)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

DebugEntrySoundMood.java28 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.Minecraft;
7
import net.minecraft.world.level.Level;
8
import net.minecraft.world.level.chunk.LevelChunk;
9
import org.jspecify.annotations.Nullable;
10
11
@Environment(EnvType.CLIENT)
12
public class DebugEntrySoundMood implements DebugScreenEntry {
13
	@Override
14
	public void display(
15
		final DebugScreenDisplayer displayer,
16
		final @Nullable Level serverOrClientLevel,
17
		final @Nullable LevelChunk clientChunk,
18
		final @Nullable LevelChunk serverChunk
19
	) {
20
		Minecraft minecraft = Minecraft.getInstance();
21
		if (minecraft.player != null) {
22
			displayer.addLine(
23
				minecraft.getSoundManager().getChannelDebugString() + String.format(Locale.ROOT, " (Mood %d%%)", Math.round(minecraft.player.getCurrentMood() * 100.0F))
24
			);
25
		}
26
	}
27
}
28

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