Skip to content

Commit 2c74c60

Browse files
committed
Add some small mappings around lighting
1 parent 2803f2b commit 2c74c60

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

mappings/net/minecraft/util/math/ChunkSectionPos.mapping

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
CLASS net/minecraft/class_4076 net/minecraft/util/math/ChunkSectionPos
22
FIELD field_62995 PACKET_CODEC Lnet/minecraft/class_9139;
3+
METHOD <init> (III)V
4+
ARG 1 x
5+
ARG 2 y
6+
ARG 3 z
37
METHOD method_18674 getSectionX ()I
48
METHOD method_18675 getSectionCoord (I)I
59
COMMENT Converts a world coordinate to the corresponding chunk-section coordinate.

mappings/net/minecraft/world/chunk/light/ChunkLightProvider.mapping

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ CLASS net/minecraft/class_3558 net/minecraft/world/chunk/light/ChunkLightProvide
44
FIELD field_16513 DIRECTIONS [Lnet/minecraft/class_2350;
55
FIELD field_17397 cachedChunkPositions [J
66
FIELD field_17398 cachedChunks [Lnet/minecraft/class_8527;
7+
FIELD field_31709 CHUNK_CACHE_SIZE I
78
FIELD field_44733 blockPositionsToCheck Lit/unimi/dsi/fastutil/longs/LongOpenHashSet;
9+
FIELD field_44734 queuedLightDecreases Lit/unimi/dsi/fastutil/longs/LongArrayFIFOQueue;
10+
FIELD field_44735 queuedLightIncreases Lit/unimi/dsi/fastutil/longs/LongArrayFIFOQueue;
811
METHOD <init> (Lnet/minecraft/class_2823;Lnet/minecraft/class_3560;)V
912
ARG 1 chunkProvider
1013
ARG 2 lightStorage
@@ -56,18 +59,21 @@ CLASS net/minecraft/class_3558 net/minecraft/world/chunk/light/ChunkLightProvide
5659
METHOD method_51566 queueLightIncrease (JJ)V
5760
ARG 1 blockPos
5861
ARG 3 flags
62+
METHOD method_51567 processLightIncreases ()I
5963
METHOD method_51568 getStatus (J)Lnet/minecraft/class_3560$class_8530;
6064
ARG 1 sectionPos
65+
METHOD method_51570 processLightDecreases ()I
6166
CLASS class_8531 PackedInfo
62-
COMMENT Methods for manipulating a set of bitflags with yet unknown functionality.
67+
COMMENT Methods for manipulating a set of bitflags pertaining to light updates.
6368
COMMENT
6469
COMMENT <ul>
65-
COMMENT <li>Bits 0 – 3 stores the light level.</li>
66-
COMMENT <li>Bits 4 – 9 store a flag for each of the six directions.</li>
70+
COMMENT <li>Bits 0 – 3 store the light level.</li>
71+
COMMENT <li>Bits 4 – 9 store flags indicating whether a light update should propagate in each direction.</li>
6772
COMMENT <li>Bit 10 stores whether the block at this position is trivial for lighting — if its opacity is not directionally dependent.</li>
6873
COMMENT <li>Bit 11 stores a flag for forcibly setting the light level.</li>
6974
COMMENT </ul>
7075
FIELD field_44737 DIRECTION_BIT_OFFSET I
76+
FIELD field_44738 DIRECTION_COUNT I
7177
FIELD field_44739 LIGHT_LEVEL_MASK J
7278
FIELD field_44740 DIRECTION_BIT_MASK J
7379
FIELD field_44741 TRIVIAL_FLAG J

mappings/net/minecraft/world/chunk/light/ChunkSkyLightProvider.mapping

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
CLASS net/minecraft/class_3572 net/minecraft/world/chunk/light/ChunkSkyLightProvider
2+
FIELD field_44746 tempPos Lnet/minecraft/class_2338$class_2339;
23
FIELD field_44747 defaultSkyLight Lnet/minecraft/class_8528;
34
METHOD <init> (Lnet/minecraft/class_2823;)V
45
ARG 1 chunkProvider
@@ -14,19 +15,29 @@ CLASS net/minecraft/class_3572 net/minecraft/world/chunk/light/ChunkSkyLightProv
1415
METHOD method_51586 (IIII)V
1516
ARG 1 x
1617
ARG 2 z
18+
ARG 3 skyLightY
19+
ARG 4 minY
1720
METHOD method_51587 (JLnet/minecraft/class_2350;IZI)V
1821
ARG 1 blockPos
1922
ARG 3 direction
2023
ARG 4 lightLevel
24+
ARG 5 increase
25+
ARG 6 numSectionsBelow
2126
METHOD method_51588 exitsChunkXZ (Lnet/minecraft/class_2350;II)Z
2227
ARG 0 direction
2328
ARG 1 localX
2429
ARG 2 localZ
2530
METHOD method_51589 getSkyLight (II)Lnet/minecraft/class_8528;
2631
ARG 1 chunkX
2732
ARG 2 chunkZ
33+
METHOD method_51590 (III)V
34+
ARG 1 x
35+
ARG 2 z
36+
ARG 3 skyLightY
2837
METHOD method_51591 (IIII)V
2938
ARG 1 x
3039
ARG 2 z
40+
ARG 3 skyLightY
41+
ARG 4 minY
3142
METHOD method_51592 getNumberOfSectionsBelowPos (J)I
3243
ARG 1 blockPos

mappings/net/minecraft/world/chunk/light/LightStorage.mapping

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ CLASS net/minecraft/class_3560 net/minecraft/world/chunk/light/LightStorage
7070
METHOD method_51546 setSectionPropagation (JB)V
7171
ARG 1 sectionPos
7272
ARG 3 flags
73-
METHOD method_51547 (J)Lnet/minecraft/class_2804;
73+
METHOD method_51547 getModifiableLightSection (J)Lnet/minecraft/class_2804;
7474
ARG 1 sectionPos
7575
METHOD method_51548 isSectionInEnabledColumn (J)Z
7676
ARG 1 sectionPos

0 commit comments

Comments
 (0)