Package net.minecraft.client.render
Class LightmapTextureManager
java.lang.Object
net.minecraft.client.render.LightmapTextureManager
- All Implemented Interfaces:
AutoCloseable
The lightmap texture manager maintains a texture containing the RGBA overlay for each of the 16×16 sky and block light combinations.
Also contains some utilities to pack and unpack lightmap coordinates from sky and block light values, and some lightmap coordinates constants.
- Mappings:
Namespace Name named net/minecraft/client/render/LightmapTextureManager
intermediary net/minecraft/class_765
official gli
-
Field Summary
Modifier and TypeFieldDescriptionprivate final MinecraftClient
private boolean
private static final int
private float
private final SimpleFramebuffer
static final int
Represents the maximum block-light-wise lightmap coordinate whose value is 240.static final int
Represents the maximum lightmap coordinate, where both sky light and block light equals15
.static final int
Represents the maximum sky-light-wise lightmap coordinate whose value is 15728640.private final GameRenderer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
applyEmission
(int light, int lightEmission) void
close()
void
disable()
void
enable()
static int
getBlockLightCoordinates
(int light) static float
getBrightness
(float ambientLight, int lightLevel) static float
getBrightness
(DimensionType type, int lightLevel) private float
getDarkness
(LivingEntity entity, float factor, float delta) private float
getDarknessFactor
(float delta) static int
getSkyLightCoordinates
(int light) static int
pack
(int block, int sky) void
tick()
void
update
(float delta)
-
Field Details
-
MAX_LIGHT_COORDINATE
public static final int MAX_LIGHT_COORDINATERepresents the maximum lightmap coordinate, where both sky light and block light equals15
. The value of this maximum lightmap coordinate is 15728880.- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_LIGHT_COORDINATE
Lnet/minecraft/client/render/LightmapTextureManager;MAX_LIGHT_COORDINATE:I
intermediary field_32767
Lnet/minecraft/class_765;field_32767:I
official a
Lgli;a:I
-
MAX_SKY_LIGHT_COORDINATE
public static final int MAX_SKY_LIGHT_COORDINATERepresents the maximum sky-light-wise lightmap coordinate whose value is 15728640. This is equivalent to a15
sky light and0
block light.- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_SKY_LIGHT_COORDINATE
Lnet/minecraft/client/render/LightmapTextureManager;MAX_SKY_LIGHT_COORDINATE:I
intermediary field_32768
Lnet/minecraft/class_765;field_32768:I
official b
Lgli;b:I
-
MAX_BLOCK_LIGHT_COORDINATE
public static final int MAX_BLOCK_LIGHT_COORDINATERepresents the maximum block-light-wise lightmap coordinate whose value is 240. This is equivalent to a0
sky light and15
block light.- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_BLOCK_LIGHT_COORDINATE
Lnet/minecraft/client/render/LightmapTextureManager;MAX_BLOCK_LIGHT_COORDINATE:I
intermediary field_32769
Lnet/minecraft/class_765;field_32769:I
official c
Lgli;c:I
-
field_53098
private static final int field_53098- See Also:
- Mappings:
Namespace Name Mixin selector named field_53098
Lnet/minecraft/client/render/LightmapTextureManager;field_53098:I
intermediary field_53098
Lnet/minecraft/class_765;field_53098:I
official d
Lgli;d:I
-
lightmapFramebuffer
- Mappings:
Namespace Name Mixin selector named lightmapFramebuffer
Lnet/minecraft/client/render/LightmapTextureManager;lightmapFramebuffer:Lnet/minecraft/client/gl/SimpleFramebuffer;
intermediary field_53101
Lnet/minecraft/class_765;field_53101:Lnet/minecraft/class_6367;
official e
Lgli;e:Lffc;
-
dirty
private boolean dirty- Mappings:
Namespace Name Mixin selector named dirty
Lnet/minecraft/client/render/LightmapTextureManager;dirty:Z
intermediary field_4135
Lnet/minecraft/class_765;field_4135:Z
official f
Lgli;f:Z
-
flickerIntensity
private float flickerIntensity- Mappings:
Namespace Name Mixin selector named flickerIntensity
Lnet/minecraft/client/render/LightmapTextureManager;flickerIntensity:F
intermediary field_21528
Lnet/minecraft/class_765;field_21528:F
official g
Lgli;g:F
-
renderer
- Mappings:
Namespace Name Mixin selector named renderer
Lnet/minecraft/client/render/LightmapTextureManager;renderer:Lnet/minecraft/client/render/GameRenderer;
intermediary field_4134
Lnet/minecraft/class_765;field_4134:Lnet/minecraft/class_757;
official h
Lgli;h:Lgla;
-
client
- Mappings:
Namespace Name Mixin selector named client
Lnet/minecraft/client/render/LightmapTextureManager;client:Lnet/minecraft/client/MinecraftClient;
intermediary field_4137
Lnet/minecraft/class_765;field_4137:Lnet/minecraft/class_310;
official i
Lgli;i:Lfmf;
-
-
Constructor Details
-
LightmapTextureManager
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/client/render/LightmapTextureManager;<init>(Lnet/minecraft/client/render/GameRenderer;Lnet/minecraft/client/MinecraftClient;)V
intermediary <init>
Lnet/minecraft/class_765;<init>(Lnet/minecraft/class_757;Lnet/minecraft/class_310;)V
official <init>
Lgli;<init>(Lgla;Lfmf;)V
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
tick
public void tick()- Mappings:
Namespace Name Mixin selector named tick
Lnet/minecraft/client/render/LightmapTextureManager;tick()V
intermediary method_3314
Lnet/minecraft/class_765;method_3314()V
official a
Lgli;a()V
-
disable
public void disable()- Mappings:
Namespace Name Mixin selector named disable
Lnet/minecraft/client/render/LightmapTextureManager;disable()V
intermediary method_3315
Lnet/minecraft/class_765;method_3315()V
official b
Lgli;b()V
-
enable
public void enable()- Mappings:
Namespace Name Mixin selector named enable
Lnet/minecraft/client/render/LightmapTextureManager;enable()V
intermediary method_3316
Lnet/minecraft/class_765;method_3316()V
official c
Lgli;c()V
-
getDarknessFactor
private float getDarknessFactor(float delta) - Mappings:
Namespace Name Mixin selector named getDarknessFactor
Lnet/minecraft/client/render/LightmapTextureManager;getDarknessFactor(F)F
intermediary method_42597
Lnet/minecraft/class_765;method_42597(F)F
official b
Lgli;b(F)F
-
getDarkness
- Mappings:
Namespace Name Mixin selector named getDarkness
Lnet/minecraft/client/render/LightmapTextureManager;getDarkness(Lnet/minecraft/entity/LivingEntity;FF)F
intermediary method_42596
Lnet/minecraft/class_765;method_42596(Lnet/minecraft/class_1309;FF)F
official a
Lgli;a(Lbwf;FF)F
-
update
public void update(float delta) - Mappings:
Namespace Name Mixin selector named update
Lnet/minecraft/client/render/LightmapTextureManager;update(F)V
intermediary method_3313
Lnet/minecraft/class_765;method_3313(F)V
official a
Lgli;a(F)V
-
getBrightness
- Mappings:
Namespace Name Mixin selector named getBrightness
Lnet/minecraft/client/render/LightmapTextureManager;getBrightness(Lnet/minecraft/world/dimension/DimensionType;I)F
intermediary method_23284
Lnet/minecraft/class_765;method_23284(Lnet/minecraft/class_2874;I)F
official a
Lgli;a(Lebp;I)F
-
getBrightness
public static float getBrightness(float ambientLight, int lightLevel) - Mappings:
Namespace Name Mixin selector named getBrightness
Lnet/minecraft/client/render/LightmapTextureManager;getBrightness(FI)F
intermediary method_62226
Lnet/minecraft/class_765;method_62226(FI)F
official a
Lgli;a(FI)F
-
pack
public static int pack(int block, int sky) - Mappings:
Namespace Name Mixin selector named pack
Lnet/minecraft/client/render/LightmapTextureManager;pack(II)I
intermediary method_23687
Lnet/minecraft/class_765;method_23687(II)I
official a
Lgli;a(II)I
-
getBlockLightCoordinates
public static int getBlockLightCoordinates(int light) - Mappings:
Namespace Name Mixin selector named getBlockLightCoordinates
Lnet/minecraft/client/render/LightmapTextureManager;getBlockLightCoordinates(I)I
intermediary method_24186
Lnet/minecraft/class_765;method_24186(I)I
official a
Lgli;a(I)I
-
getSkyLightCoordinates
public static int getSkyLightCoordinates(int light) - Mappings:
Namespace Name Mixin selector named getSkyLightCoordinates
Lnet/minecraft/client/render/LightmapTextureManager;getSkyLightCoordinates(I)I
intermediary method_24187
Lnet/minecraft/class_765;method_24187(I)I
official b
Lgli;b(I)I
-
applyEmission
public static int applyEmission(int light, int lightEmission) - Mappings:
Namespace Name Mixin selector named applyEmission
Lnet/minecraft/client/render/LightmapTextureManager;applyEmission(II)I
intermediary method_62228
Lnet/minecraft/class_765;method_62228(II)I
official b
Lgli;b(II)I
-