forked from shedaniel/LightOverlay
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: shedaniel <daniel@shedaniel.me>
- Loading branch information
Showing
6 changed files
with
115 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
common/src/main/java/me/shedaniel/lightoverlay/common/LevelChunkAccess.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package me.shedaniel.lightoverlay.common; | ||
|
||
import net.minecraft.world.level.chunk.LevelChunkSection; | ||
|
||
public interface LevelChunkAccess { | ||
LevelChunkSection[] lightoverlay_getSections(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
fabric/src/main/java/me/shedaniel/lightoverlay/fabric/mixin/MixinLevelChunk.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package me.shedaniel.lightoverlay.fabric.mixin; | ||
|
||
import me.shedaniel.lightoverlay.common.LevelChunkAccess; | ||
import net.minecraft.world.level.chunk.LevelChunk; | ||
import net.minecraft.world.level.chunk.LevelChunkSection; | ||
import org.spongepowered.asm.mixin.Final; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(LevelChunk.class) | ||
public class MixinLevelChunk implements LevelChunkAccess { | ||
@Shadow @Final private LevelChunkSection[] sections; | ||
|
||
@Override | ||
public LevelChunkSection[] lightoverlay_getSections() { | ||
return sections; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters