Update core. Port back fix for onChunkLoad light issue

This commit is contained in:
tom lee
2022-01-12 18:02:02 +08:00
parent 2bd74d379c
commit 7902d483ec
4 changed files with 19 additions and 8 deletions
@@ -57,10 +57,7 @@ public class WrapperFactory implements IWrapperFactory {
@Override
public AbstractChunkPosWrapper createChunkPos(long xAndZPositionCombined) {
int x = (int) (xAndZPositionCombined & Integer.MAX_VALUE);
int z = (int) (xAndZPositionCombined >> Long.SIZE / 2) & Integer.MAX_VALUE;
return new ChunkPosWrapper(x, z);
return new ChunkPosWrapper(xAndZPositionCombined);
}
@Override
@@ -42,6 +42,11 @@ public class ChunkPosWrapper extends AbstractChunkPosWrapper
{
this.chunkPos = new ChunkPos(chunkX, chunkZ);
}
public ChunkPosWrapper(long l)
{
this.chunkPos = new ChunkPos(l);
}
public ChunkPosWrapper(ChunkPos pos)
@@ -92,6 +97,11 @@ public class ChunkPosWrapper extends AbstractChunkPosWrapper
{
return chunkPos;
}
@Override
public long getLong() {
return chunkPos.toLong();
}
@Override
public boolean equals(Object o)
@@ -122,4 +132,5 @@ public class ChunkPosWrapper extends AbstractChunkPosWrapper
return new BlockPosWrapper(blockPos.getX(), blockPos.getY(), blockPos.getZ());
}
}
@@ -1,14 +1,11 @@
package com.seibel.lod.common.wrappers.chunk;
import com.seibel.lod.core.wrapperInterfaces.block.AbstractBlockPosWrapper;
import com.seibel.lod.core.wrapperInterfaces.block.IBlockColorWrapper;
import com.seibel.lod.core.wrapperInterfaces.block.IBlockShapeWrapper;
import com.seibel.lod.core.wrapperInterfaces.chunk.AbstractChunkPosWrapper;
import com.seibel.lod.core.wrapperInterfaces.chunk.IChunkWrapper;
import com.seibel.lod.core.wrapperInterfaces.world.IBiomeWrapper;
import com.seibel.lod.common.wrappers.WrapperUtil;
import com.seibel.lod.common.wrappers.block.BlockColorWrapper;
import com.seibel.lod.common.wrappers.block.BlockPosWrapper;
import com.seibel.lod.common.wrappers.block.BlockShapeWrapper;
import com.seibel.lod.common.wrappers.world.BiomeWrapper;
@@ -22,6 +19,7 @@ import net.minecraft.world.level.block.SimpleWaterloggedBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.LevelChunk;
import net.minecraft.world.level.chunk.LevelChunkSection;
import net.minecraft.world.level.levelgen.Heightmap;
@@ -146,6 +144,11 @@ public class ChunkWrapper implements IChunkWrapper
return chunk.getPos().getMinBlockZ();
}
@Override
public long getLongChunkPos() {
return chunk.getPos().toLong();
}
@Override
public boolean isLightCorrect(){
return chunk.isLightCorrect();
+1 -1
Submodule core updated: 02143d0951...bb22ad58bc