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 fjlintermediary net/minecraft/class_765named net/minecraft/client/render/LightmapTextureManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MinecraftClientprivate booleanprivate floatprivate final NativeImagestatic final intRepresents the maximum block-light-wise lightmap coordinate whose value is 240.static final intRepresents the maximum lightmap coordinate, where both sky light and block light equals15.static final intRepresents the maximum sky-light-wise lightmap coordinate whose value is 15728640.private final GameRendererprivate final NativeImageBackedTextureprivate final Identifier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidClamps each component ofvecbetween0.0fand1.0f.voidclose()voiddisable()private floateaseOutQuart(float x) Represents an easing function.voidenable()static intgetBlockLightCoordinates(int light) static floatgetBrightness(DimensionType type, int lightLevel) private floatgetDarkness(LivingEntity entity, float factor, float delta) private floatgetDarknessFactor(float delta) static intgetSkyLightCoordinates(int light) static intpack(int block, int sky) voidtick()voidupdate(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 aLfjl;a:Iintermediary field_32767Lnet/minecraft/class_765;field_32767:Inamed MAX_LIGHT_COORDINATELnet/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 a15sky light and0block light.- See Also:
- Mappings:
Namespace Name Mixin selector official bLfjl;b:Iintermediary field_32768Lnet/minecraft/class_765;field_32768:Inamed MAX_SKY_LIGHT_COORDINATELnet/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 a0sky light and15block light.- See Also:
- Mappings:
Namespace Name Mixin selector official cLfjl;c:Iintermediary field_32769Lnet/minecraft/class_765;field_32769:Inamed MAX_BLOCK_LIGHT_COORDINATELnet/minecraft/client/render/LightmapTextureManager;MAX_BLOCK_LIGHT_COORDINATE:I
-
texture
- Mappings:
Namespace Name Mixin selector official dLfjl;d:Lftx;intermediary field_4138Lnet/minecraft/class_765;field_4138:Lnet/minecraft/class_1043;named textureLnet/minecraft/client/render/LightmapTextureManager;texture:Lnet/minecraft/client/texture/NativeImageBackedTexture;
-
image
- Mappings:
Namespace Name Mixin selector official eLfjl;e:Lehc;intermediary field_4133Lnet/minecraft/class_765;field_4133:Lnet/minecraft/class_1011;named imageLnet/minecraft/client/render/LightmapTextureManager;image:Lnet/minecraft/client/texture/NativeImage;
-
textureIdentifier
- Mappings:
Namespace Name Mixin selector official fLfjl;f:Lacq;intermediary field_4136Lnet/minecraft/class_765;field_4136:Lnet/minecraft/class_2960;named textureIdentifierLnet/minecraft/client/render/LightmapTextureManager;textureIdentifier:Lnet/minecraft/util/Identifier;
-
dirty
private boolean dirty- Mappings:
Namespace Name Mixin selector official gLfjl;g:Zintermediary field_4135Lnet/minecraft/class_765;field_4135:Znamed dirtyLnet/minecraft/client/render/LightmapTextureManager;dirty:Z
-
flickerIntensity
private float flickerIntensity- Mappings:
Namespace Name Mixin selector official hLfjl;h:Fintermediary field_21528Lnet/minecraft/class_765;field_21528:Fnamed flickerIntensityLnet/minecraft/client/render/LightmapTextureManager;flickerIntensity:F
-
renderer
- Mappings:
Namespace Name Mixin selector official iLfjl;i:Lfjf;intermediary field_4134Lnet/minecraft/class_765;field_4134:Lnet/minecraft/class_757;named rendererLnet/minecraft/client/render/LightmapTextureManager;renderer:Lnet/minecraft/client/render/GameRenderer;
-
client
- Mappings:
Namespace Name Mixin selector official jLfjl;j:Lenf;intermediary field_4137Lnet/minecraft/class_765;field_4137:Lnet/minecraft/class_310;named clientLnet/minecraft/client/render/LightmapTextureManager;client:Lnet/minecraft/client/MinecraftClient;
-
-
Constructor Details
-
LightmapTextureManager
- Mappings:
Namespace Name Mixin selector official <init>Lfjl;<init>(Lfjf;Lenf;)Vintermediary <init>Lnet/minecraft/class_765;<init>(Lnet/minecraft/class_757;Lnet/minecraft/class_310;)Vnamed <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:
closein interfaceAutoCloseable
-
tick
public void tick()- Mappings:
Namespace Name Mixin selector official aLfjl;a()Vintermediary method_3314Lnet/minecraft/class_765;method_3314()Vnamed tickLnet/minecraft/client/render/LightmapTextureManager;tick()V
-
disable
public void disable()- Mappings:
Namespace Name Mixin selector official bLfjl;b()Vintermediary method_3315Lnet/minecraft/class_765;method_3315()Vnamed disableLnet/minecraft/client/render/LightmapTextureManager;disable()V
-
enable
public void enable()- Mappings:
Namespace Name Mixin selector official cLfjl;c()Vintermediary method_3316Lnet/minecraft/class_765;method_3316()Vnamed enableLnet/minecraft/client/render/LightmapTextureManager;enable()V
-
getDarknessFactor
private float getDarknessFactor(float delta) - Mappings:
Namespace Name Mixin selector official bLfjl;b(F)Fintermediary method_42597Lnet/minecraft/class_765;method_42597(F)Fnamed getDarknessFactorLnet/minecraft/client/render/LightmapTextureManager;getDarknessFactor(F)F
-
getDarkness
- Mappings:
Namespace Name Mixin selector official aLfjl;a(Lbfx;FF)Fintermediary method_42596Lnet/minecraft/class_765;method_42596(Lnet/minecraft/class_1309;FF)Fnamed getDarknessLnet/minecraft/client/render/LightmapTextureManager;getDarkness(Lnet/minecraft/entity/LivingEntity;FF)F
-
update
public void update(float delta) - Mappings:
Namespace Name Mixin selector official aLfjl;a(F)Vintermediary method_3313Lnet/minecraft/class_765;method_3313(F)Vnamed updateLnet/minecraft/client/render/LightmapTextureManager;update(F)V
-
clamp
Clamps each component ofvecbetween0.0fand1.0f.- Mappings:
Namespace Name Mixin selector official aLfjl;a(Lorg/joml/Vector3f;)Vintermediary method_46557Lnet/minecraft/class_765;method_46557(Lorg/joml/Vector3f;)Vnamed clampLnet/minecraft/client/render/LightmapTextureManager;clamp(Lorg/joml/Vector3f;)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 cLfjl;c(F)Fintermediary method_23795Lnet/minecraft/class_765;method_23795(F)Fnamed easeOutQuartLnet/minecraft/client/render/LightmapTextureManager;easeOutQuart(F)F
-
getBrightness
- Mappings:
Namespace Name Mixin selector official aLfjl;a(Ldfh;I)Fintermediary method_23284Lnet/minecraft/class_765;method_23284(Lnet/minecraft/class_2874;I)Fnamed getBrightnessLnet/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 aLfjl;a(II)Iintermediary method_23687Lnet/minecraft/class_765;method_23687(II)Inamed packLnet/minecraft/client/render/LightmapTextureManager;pack(II)I
-
getBlockLightCoordinates
public static int getBlockLightCoordinates(int light) - Mappings:
Namespace Name Mixin selector official aLfjl;a(I)Iintermediary method_24186Lnet/minecraft/class_765;method_24186(I)Inamed getBlockLightCoordinatesLnet/minecraft/client/render/LightmapTextureManager;getBlockLightCoordinates(I)I
-
getSkyLightCoordinates
public static int getSkyLightCoordinates(int light) - Mappings:
Namespace Name Mixin selector official bLfjl;b(I)Iintermediary method_24187Lnet/minecraft/class_765;method_24187(I)Inamed getSkyLightCoordinatesLnet/minecraft/client/render/LightmapTextureManager;getSkyLightCoordinates(I)I
-