@Environment(value=CLIENT) public class DebugHud extends DrawableHelper
Modifier and Type | Field and Description |
---|---|
private HitResult |
blockHit |
private WorldChunk |
chunk |
private CompletableFuture<WorldChunk> |
chunkFuture |
private MinecraftClient |
client |
private HitResult |
fluidHit |
private TextRenderer |
fontRenderer |
private static Map<Heightmap.Type,String> |
HEIGHT_MAP_TYPES |
private ChunkPos |
pos |
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Constructor and Description |
---|
DebugHud(MinecraftClient client) |
Modifier and Type | Method and Description |
---|---|
private void |
drawMetricsData(MatrixStack matrices,
MetricsData metricsData,
int x,
int width,
boolean showFps) |
private WorldChunk |
getChunk() |
private WorldChunk |
getClientChunk() |
protected List<String> |
getLeftText() |
private int |
getMetricsLineColor(int value,
int greenValue,
int yellowValue,
int redValue) |
protected List<String> |
getRightText() |
private ServerWorld |
getServerWorld() |
private String |
getServerWorldDebugString() |
private World |
getWorld() |
private int |
interpolateColor(int color1,
int color2,
float dt) |
private String |
propertyToString(Map.Entry<Property<?>,Comparable<?>> propEntry) |
void |
render(MatrixStack matrices) |
protected void |
renderLeftText(MatrixStack matrices) |
protected void |
renderRightText(MatrixStack matrices) |
void |
resetChunk() |
private static long |
toMiB(long bytes) |
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffset
private static final Map<Heightmap.Type,String> HEIGHT_MAP_TYPES
private final MinecraftClient client
private final TextRenderer fontRenderer
private HitResult blockHit
private HitResult fluidHit
@Nullable private WorldChunk chunk
@Nullable private CompletableFuture<WorldChunk> chunkFuture
public DebugHud(MinecraftClient client)
public void resetChunk()
public void render(MatrixStack matrices)
protected void renderLeftText(MatrixStack matrices)
protected void renderRightText(MatrixStack matrices)
@Nullable private ServerWorld getServerWorld()
private World getWorld()
@Nullable private WorldChunk getChunk()
private WorldChunk getClientChunk()
private String propertyToString(Map.Entry<Property<?>,Comparable<?>> propEntry)
private void drawMetricsData(MatrixStack matrices, MetricsData metricsData, int x, int width, boolean showFps)
private int getMetricsLineColor(int value, int greenValue, int yellowValue, int redValue)
private int interpolateColor(int color1, int color2, float dt)
private static long toMiB(long bytes)