Rewrite regenerateChunkRegion

This commit is contained in:
PhiPro95 committed 2020-06-29 01:03:26 +02:00
1 parent b9f2e68ddb
commit 0c1dba0157
19 files changed
+876 -208

No files matched your search

@@ -0,0 +1,36 @@
package carpet.mixins;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.gen.Invoker;
import carpet.fakes.ChunkLightProviderInterface;
import carpet.fakes.Lighting_scarpetChunkCreationInterface;
import net.minecraft.world.chunk.ChunkNibbleArray;
import net.minecraft.world.chunk.light.ChunkLightProvider;
import net.minecraft.world.chunk.light.LightStorage;
@Mixin(ChunkLightProvider.class)
public abstract class ChunkLightProvider_scarpetChunkCreationMixin implements Lighting_scarpetChunkCreationInterface, ChunkLightProviderInterface
{
@Shadow
@Final
protected LightStorage<?> lightStorage;
@Override
public void removeLightData(final long pos)
{
((Lighting_scarpetChunkCreationInterface) this.lightStorage).removeLightData(pos);
}
@Override
public void relight(final long pos)
{
((Lighting_scarpetChunkCreationInterface) this.lightStorage).relight(pos);
}
@Override
@Invoker("getCurrentLevelFromArray")
public abstract int callGetCurrentLevelFromArray(ChunkNibbleArray array, long blockPos);
}