package net.minecraft.client.gui.components.debug; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.Minecraft; import net.minecraft.world.level.Level; import net.minecraft.world.level.chunk.LevelChunk; import org.jspecify.annotations.Nullable; @Environment(EnvType.CLIENT) public class DebugEntryEntityRenderStats implements DebugScreenEntry { @Override public void display( final DebugScreenDisplayer displayer, @Nullable final Level serverOrClientLevel, @Nullable final LevelChunk clientChunk, @Nullable final LevelChunk serverChunk ) { String stats = Minecraft.getInstance().levelExtractor.entityStatistics(); if (stats != null) { displayer.addLine(stats); } } @Override public boolean isAllowed(final boolean reducedDebugInfo) { return true; } }