-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chunks are lit during world generation, and lighting is updating using the `NoisiumServerChunkEvent.LIGHT_UPDATE` event.
- Loading branch information
1 parent
c25300c
commit 5c857c0
Showing
9 changed files
with
123 additions
and
64 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
...java/io/github/steveplays28/noisium/extension/world/chunk/NoisiumWorldChunkExtension.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,9 @@ | ||
package io.github.steveplays28.noisium.extension.world.chunk; | ||
|
||
import java.util.BitSet; | ||
|
||
public interface NoisiumWorldChunkExtension { | ||
BitSet noisium$getBlockLightBits(); | ||
|
||
BitSet noisium$getSkyLightBits(); | ||
} |
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
26 changes: 26 additions & 0 deletions
26
common/src/main/java/io/github/steveplays28/noisium/mixin/world/chunk/WorldChunkMixin.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,26 @@ | ||
package io.github.steveplays28.noisium.mixin.world.chunk; | ||
|
||
import io.github.steveplays28.noisium.extension.world.chunk.NoisiumWorldChunkExtension; | ||
import net.minecraft.world.chunk.WorldChunk; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
|
||
import java.util.BitSet; | ||
|
||
@Mixin(WorldChunk.class) | ||
public class WorldChunkMixin implements NoisiumWorldChunkExtension { | ||
@Unique | ||
private final BitSet noisium$blockLightBits = new BitSet(); | ||
@Unique | ||
private final BitSet noisium$skyLightBits = new BitSet(); | ||
|
||
@Override | ||
public BitSet noisium$getBlockLightBits() { | ||
return noisium$blockLightBits; | ||
} | ||
|
||
@Override | ||
public BitSet noisium$getSkyLightBits() { | ||
return noisium$skyLightBits; | ||
} | ||
} |
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
10 changes: 0 additions & 10 deletions
10
common/src/main/java/io/github/steveplays28/noisium/server/world/chunk/ServerChunkData.java
This file was deleted.
Oops, something went wrong.
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
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