Package net.minecraft.client.renderer
Class LightTexture
java.lang.Object
net.minecraft.client.renderer.LightTexture
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate float
static final int
static final int
static final int
private static final int
private final Minecraft
private final GameRenderer
private final GpuTexture
private static final int
private final GpuTextureView
private final MappableRingBuffer
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
block
(int pPackedLight) static int
blockWithFraction
(int light) private float
calculateDarknessScale
(LivingEntity pEntity, float pGamma, float pPartialTick) void
close()
static float
getBrightness
(float pAmbientLight, int pLightLevel) static float
getBrightness
(DimensionType pDimensionType, int pLightLevel) static int
lightCoordsWithEmission
(int pPackedLight, int pEmission) static int
pack
(int pBlockLight, int pSkyLight) static int
packWithFraction
(int block, int sky) static int
sky
(int pPackedLight) static int
skyWithFraction
(int light) void
tick()
void
void
void
updateLightTexture
(float pPartialTicks)
-
Field Details
-
FULL_BRIGHT
public static final int FULL_BRIGHT- See Also:
-
FULL_SKY
public static final int FULL_SKY- See Also:
-
FULL_BLOCK
public static final int FULL_BLOCK- See Also:
-
TEXTURE_SIZE
private static final int TEXTURE_SIZE- See Also:
-
LIGHTMAP_UBO_SIZE
private static final int LIGHTMAP_UBO_SIZE -
texture
-
textureView
-
updateLightTexture
private boolean updateLightTexture -
blockLightRedFlicker
private float blockLightRedFlicker -
renderer
-
minecraft
-
ubo
-
-
Constructor Details
-
LightTexture
-
-
Method Details
-
getTextureView
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
tick
public void tick() -
turnOffLightLayer
public void turnOffLightLayer() -
turnOnLightLayer
public void turnOnLightLayer() -
calculateDarknessScale
-
updateLightTexture
public void updateLightTexture(float pPartialTicks) -
getBrightness
-
getBrightness
public static float getBrightness(float pAmbientLight, int pLightLevel) -
pack
public static int pack(int pBlockLight, int pSkyLight) -
block
public static int block(int pPackedLight) -
sky
public static int sky(int pPackedLight) -
lightCoordsWithEmission
public static int lightCoordsWithEmission(int pPackedLight, int pEmission) -
packWithFraction
public static int packWithFraction(int block, int sky) -
blockWithFraction
public static int blockWithFraction(int light) -
skyWithFraction
public static int skyWithFraction(int light)
-