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 official ezr
intermediary net/minecraft/class_765
named net/minecraft/client/render/LightmapTextureManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MinecraftClient
private boolean
private float
private final NativeImage
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
private final NativeImageBackedTexture
private final Identifier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
disable()
private float
easeOutQuart
(float x) Represents an easing function.void
enable()
static int
getBlockLightCoordinates
(int light) 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 official a
Lezr;a:I
intermediary field_32767
Lnet/minecraft/class_765;field_32767:I
named MAX_LIGHT_COORDINATE
Lnet/minecraft/client/render/LightmapTextureManager;MAX_LIGHT_COORDINATE: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 official b
Lezr;b:I
intermediary field_32768
Lnet/minecraft/class_765;field_32768:I
named MAX_SKY_LIGHT_COORDINATE
Lnet/minecraft/client/render/LightmapTextureManager;MAX_SKY_LIGHT_COORDINATE: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 official c
Lezr;c:I
intermediary field_32769
Lnet/minecraft/class_765;field_32769:I
named MAX_BLOCK_LIGHT_COORDINATE
Lnet/minecraft/client/render/LightmapTextureManager;MAX_BLOCK_LIGHT_COORDINATE:I
-
texture
- Mappings:
Namespace Name Mixin selector official d
Lezr;d:Lfju;
intermediary field_4138
Lnet/minecraft/class_765;field_4138:Lnet/minecraft/class_1043;
named texture
Lnet/minecraft/client/render/LightmapTextureManager;texture:Lnet/minecraft/client/texture/NativeImageBackedTexture;
-
image
- Mappings:
Namespace Name Mixin selector official e
Lezr;e:Ldzq;
intermediary field_4133
Lnet/minecraft/class_765;field_4133:Lnet/minecraft/class_1011;
named image
Lnet/minecraft/client/render/LightmapTextureManager;image:Lnet/minecraft/client/texture/NativeImage;
-
textureIdentifier
- Mappings:
Namespace Name Mixin selector official f
Lezr;f:Labb;
intermediary field_4136
Lnet/minecraft/class_765;field_4136:Lnet/minecraft/class_2960;
named textureIdentifier
Lnet/minecraft/client/render/LightmapTextureManager;textureIdentifier:Lnet/minecraft/util/Identifier;
-
dirty
private boolean dirty- Mappings:
Namespace Name Mixin selector official g
Lezr;g:Z
intermediary field_4135
Lnet/minecraft/class_765;field_4135:Z
named dirty
Lnet/minecraft/client/render/LightmapTextureManager;dirty:Z
-
flickerIntensity
private float flickerIntensity- Mappings:
Namespace Name Mixin selector official h
Lezr;h:F
intermediary field_21528
Lnet/minecraft/class_765;field_21528:F
named flickerIntensity
Lnet/minecraft/client/render/LightmapTextureManager;flickerIntensity:F
-
renderer
- Mappings:
Namespace Name Mixin selector official i
Lezr;i:Lezl;
intermediary field_4134
Lnet/minecraft/class_765;field_4134:Lnet/minecraft/class_757;
named renderer
Lnet/minecraft/client/render/LightmapTextureManager;renderer:Lnet/minecraft/client/render/GameRenderer;
-
client
- Mappings:
Namespace Name Mixin selector official j
Lezr;j:Lefu;
intermediary field_4137
Lnet/minecraft/class_765;field_4137:Lnet/minecraft/class_310;
named client
Lnet/minecraft/client/render/LightmapTextureManager;client:Lnet/minecraft/client/MinecraftClient;
-
-
Constructor Details
-
LightmapTextureManager
- Mappings:
Namespace Name Mixin selector official <init>
Lezr;<init>(Lezl;Lefu;)V
intermediary <init>
Lnet/minecraft/class_765;<init>(Lnet/minecraft/class_757;Lnet/minecraft/class_310;)V
named <init>
Lnet/minecraft/client/render/LightmapTextureManager;<init>(Lnet/minecraft/client/render/GameRenderer;Lnet/minecraft/client/MinecraftClient;)V
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
tick
public void tick()- Mappings:
Namespace Name Mixin selector official a
Lezr;a()V
intermediary method_3314
Lnet/minecraft/class_765;method_3314()V
named tick
Lnet/minecraft/client/render/LightmapTextureManager;tick()V
-
disable
public void disable()- Mappings:
Namespace Name Mixin selector official b
Lezr;b()V
intermediary method_3315
Lnet/minecraft/class_765;method_3315()V
named disable
Lnet/minecraft/client/render/LightmapTextureManager;disable()V
-
enable
public void enable()- Mappings:
Namespace Name Mixin selector official c
Lezr;c()V
intermediary method_3316
Lnet/minecraft/class_765;method_3316()V
named enable
Lnet/minecraft/client/render/LightmapTextureManager;enable()V
-
getDarknessFactor
private float getDarknessFactor(float delta) - Mappings:
Namespace Name Mixin selector official b
Lezr;b(F)F
intermediary method_42597
Lnet/minecraft/class_765;method_42597(F)F
named getDarknessFactor
Lnet/minecraft/client/render/LightmapTextureManager;getDarknessFactor(F)F
-
getDarkness
- Mappings:
Namespace Name Mixin selector official a
Lezr;a(Lbcc;FF)F
intermediary method_42596
Lnet/minecraft/class_765;method_42596(Lnet/minecraft/class_1309;FF)F
named getDarkness
Lnet/minecraft/client/render/LightmapTextureManager;getDarkness(Lnet/minecraft/entity/LivingEntity;FF)F
-
update
public void update(float delta) - Mappings:
Namespace Name Mixin selector official a
Lezr;a(F)V
intermediary method_3313
Lnet/minecraft/class_765;method_3313(F)V
named update
Lnet/minecraft/client/render/LightmapTextureManager;update(F)V
-
easeOutQuart
private float easeOutQuart(float x) Represents an easing function.In this class, it's also used to brighten colors, then the result is used to lerp between the normal and brightened color with the gamma value.
- Parameters:
x
- represents the absolute progress of the animation in the bounds of 0 (beginning of the animation) and 1 (end of animation)- See Also:
- Mappings:
Namespace Name Mixin selector official c
Lezr;c(F)F
intermediary method_23795
Lnet/minecraft/class_765;method_23795(F)F
named easeOutQuart
Lnet/minecraft/client/render/LightmapTextureManager;easeOutQuart(F)F
-
getBrightness
- Mappings:
Namespace Name Mixin selector official a
Lezr;a(Lcyu;I)F
intermediary method_23284
Lnet/minecraft/class_765;method_23284(Lnet/minecraft/class_2874;I)F
named getBrightness
Lnet/minecraft/client/render/LightmapTextureManager;getBrightness(Lnet/minecraft/world/dimension/DimensionType;I)F
-
pack
public static int pack(int block, int sky) - Mappings:
Namespace Name Mixin selector official a
Lezr;a(II)I
intermediary method_23687
Lnet/minecraft/class_765;method_23687(II)I
named pack
Lnet/minecraft/client/render/LightmapTextureManager;pack(II)I
-
getBlockLightCoordinates
public static int getBlockLightCoordinates(int light) - Mappings:
Namespace Name Mixin selector official a
Lezr;a(I)I
intermediary method_24186
Lnet/minecraft/class_765;method_24186(I)I
named getBlockLightCoordinates
Lnet/minecraft/client/render/LightmapTextureManager;getBlockLightCoordinates(I)I
-
getSkyLightCoordinates
public static int getSkyLightCoordinates(int light) - Mappings:
Namespace Name Mixin selector official b
Lezr;b(I)I
intermediary method_24187
Lnet/minecraft/class_765;method_24187(I)I
named getSkyLightCoordinates
Lnet/minecraft/client/render/LightmapTextureManager;getSkyLightCoordinates(I)I
-