relight cleanup - think it works now. Little higher level, but that's what's needed.

This commit is contained in:
gnembon committed 2023-05-12 22:04:19 +02:00
1 parent 2cfedc733e
commit 755ec1daa8
11 files changed
+75 -365

No files matched your search

@@ -1,45 +1,23 @@
package carpet.mixins;
import carpet.fakes.LightStorageInterface;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import carpet.fakes.ChunkLightProviderInterface;
import carpet.fakes.Lighting_scarpetChunkCreationInterface;
import net.minecraft.world.level.chunk.DataLayer;
import net.minecraft.world.level.lighting.LightEngine;
import net.minecraft.world.level.lighting.LayerLightSectionStorage;
@Mixin(LightEngine.class)
public abstract class LayerLightEngine_scarpetChunkCreationMixin implements Lighting_scarpetChunkCreationInterface, ChunkLightProviderInterface
public abstract class LayerLightEngine_scarpetChunkCreationMixin implements Lighting_scarpetChunkCreationInterface
{
@Shadow
@Final
protected LayerLightSectionStorage<?> storage;
//@Shadow protected abstract void clearQueuedSectionBlocks(final long l);
@Override
public void removeLightData(final long pos)
{
((Lighting_scarpetChunkCreationInterface) this.storage).removeLightData(pos);
}
@Override
public void relight(final long pos)
{
((Lighting_scarpetChunkCreationInterface) this.storage).relight(pos);
}
@Override
public int callGetCurrentLevelFromSection(DataLayer array, long blockPos) {
return ((LightStorageInterface)storage).getLightLevelByLong(blockPos);
};
@Override
public void clearQueuedSectionBlocksPublicAccess(long sectionPos)
{
//clearQueuedSectionBlocks(sectionPos);
}
}