UiLightmap .java

net.minecraft.client.renderer.UiLightmap (class): members: getTextureView, texture, close. strings: "UI Lightmap". imports: DynamicTexture, NativeImage.

net.minecraft.client.rendererclass28 linesclient727 B

Implements

API Surface (2)

GpuTextureView getTextureView()
void close()

Fields & Constants (1)

texture

String literals (1)

"UI Lightmap"

Code Graph: Dependencies (3)

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

Full Source

UiLightmap.java28 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.renderer;
2
3
import com.mojang.blaze3d.platform.NativeImage;
4
import com.mojang.renderpearl.api.textures.GpuTextureView;
5
import net.fabricmc.api.EnvType;
6
import net.fabricmc.api.Environment;
7
import net.minecraft.client.renderer.texture.DynamicTexture;
8
9
@Environment(EnvType.CLIENT)
10
public class UiLightmap implements AutoCloseable {
11
	private final DynamicTexture texture = new DynamicTexture("UI Lightmap", 1, 1, false);
12
13
	public UiLightmap() {
14
		NativeImage pixels = this.texture.getPixels();
15
		pixels.setPixel(0, 0, -1);
16
		this.texture.upload();
17
	}
18
19
	public GpuTextureView getTextureView() {
20
		return this.texture.getTextureView();
21
	}
22
23
	@Override
24
	public void close() {
25
		this.texture.close();
26
	}
27
}
28

Decompiled Minecraft 26.3 source of UiLightmap (net/minecraft/client/renderer/UiLightmap.java) with Mojang official mappings, stored verbatim on the site.