Class LightmapTextureManager

java.lang.Object
net.minecraft.client.render.LightmapTextureManager
All Implemented Interfaces:
AutoCloseable

@Environment(CLIENT) public class LightmapTextureManager extends Object implements 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 gdp
  • Field Details Link icon

    • MAX_LIGHT_COORDINATE Link icon

      public static final int MAX_LIGHT_COORDINATE
      Represents the maximum lightmap coordinate, where both sky light and block light equals 15. 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 Lgdp;a:I
    • MAX_SKY_LIGHT_COORDINATE Link icon

      public static final int MAX_SKY_LIGHT_COORDINATE
      Represents the maximum sky-light-wise lightmap coordinate whose value is 15728640. This is equivalent to a 15 sky light and 0 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 Lgdp;b:I
    • MAX_BLOCK_LIGHT_COORDINATE Link icon

      public static final int MAX_BLOCK_LIGHT_COORDINATE
      Represents the maximum block-light-wise lightmap coordinate whose value is 240. This is equivalent to a 0 sky light and 15 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 Lgdp;c:I
    • texture Link icon

      private final NativeImageBackedTexture texture
      Mappings:
      Namespace Name Mixin selector
      named texture Lnet/minecraft/client/render/LightmapTextureManager;texture:Lnet/minecraft/client/texture/NativeImageBackedTexture;
      intermediary field_4138 Lnet/minecraft/class_765;field_4138:Lnet/minecraft/class_1043;
      official d Lgdp;d:Lgoo;
    • image Link icon

      private final NativeImage image
      Mappings:
      Namespace Name Mixin selector
      named image Lnet/minecraft/client/render/LightmapTextureManager;image:Lnet/minecraft/client/texture/NativeImage;
      intermediary field_4133 Lnet/minecraft/class_765;field_4133:Lnet/minecraft/class_1011;
      official e Lgdp;e:Lezb;
    • textureIdentifier Link icon

      private final Identifier textureIdentifier
      Mappings:
      Namespace Name Mixin selector
      named textureIdentifier Lnet/minecraft/client/render/LightmapTextureManager;textureIdentifier:Lnet/minecraft/util/Identifier;
      intermediary field_4136 Lnet/minecraft/class_765;field_4136:Lnet/minecraft/class_2960;
      official f Lgdp;f:Lalf;
    • dirty Link icon

      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 g Lgdp;g:Z
    • flickerIntensity Link icon

      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 h Lgdp;h:F
    • renderer Link icon

      private final GameRenderer 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 i Lgdp;i:Lgdj;
    • client Link icon

      private final MinecraftClient 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 j Lgdp;j:Lffh;
  • Constructor Details Link icon

    • LightmapTextureManager Link icon

      public LightmapTextureManager(GameRenderer renderer, MinecraftClient client)
      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> Lgdp;<init>(Lgdj;Lffh;)V
  • Method Details Link icon

    • close Link icon

      public void close()
      Specified by:
      close in interface AutoCloseable
    • tick Link icon

      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 Lgdp;a()V
    • disable Link icon

      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 Lgdp;b()V
    • enable Link icon

      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 Lgdp;c()V
    • getDarknessFactor Link icon

      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 Lgdp;b(F)F
    • getDarkness Link icon

      private float getDarkness(LivingEntity entity, float factor, float delta)
      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 Lgdp;a(Lbtr;FF)F
    • update Link icon

      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 Lgdp;a(F)V
    • clamp Link icon

      private static void clamp(Vector3f vec)
      Clamps each component of vec between 0.0f and 1.0f.
      Mappings:
      Namespace Name Mixin selector
      named clamp Lnet/minecraft/client/render/LightmapTextureManager;clamp(Lorg/joml/Vector3f;)V
      intermediary method_46557 Lnet/minecraft/class_765;method_46557(Lorg/joml/Vector3f;)V
      official a Lgdp;a(Lorg/joml/Vector3f;)V
    • easeOutQuart Link icon

      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
      named easeOutQuart Lnet/minecraft/client/render/LightmapTextureManager;easeOutQuart(F)F
      intermediary method_23795 Lnet/minecraft/class_765;method_23795(F)F
      official c Lgdp;c(F)F
    • getBrightness Link icon

      public static float getBrightness(DimensionType type, int lightLevel)
      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 Lgdp;a(Ldvw;I)F
    • pack Link icon

      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 Lgdp;a(II)I
    • getBlockLightCoordinates Link icon

      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 Lgdp;a(I)I
    • getSkyLightCoordinates Link icon

      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 Lgdp;b(I)I