mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 23:47:38 +01:00
Fix nullpointer with starlight
This commit is contained in:
parent
3da35a30e3
commit
7a1445f00a
2 changed files with 6 additions and 13 deletions
|
@ -56,14 +56,7 @@ public class WrappedChunkProvider extends AbstractChunkProvider {
|
|||
public WrappedChunk getChunk(int x, int z) {
|
||||
long pos = ChunkPos.asLong(x, z);
|
||||
|
||||
WrappedChunk chunk = chunks.get(pos);
|
||||
|
||||
if (chunk == null) {
|
||||
chunk = new WrappedChunk(world, x, z);
|
||||
chunks.put(pos, chunk);
|
||||
}
|
||||
|
||||
return chunk;
|
||||
return chunks.computeIfAbsent(pos, $ -> new WrappedChunk(world, x, z));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -71,6 +71,11 @@ public class WrappedChunk implements IChunk {
|
|||
return sections;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChunkStatus getStatus() {
|
||||
return ChunkStatus.LIGHT;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public BlockState setBlockState(BlockPos p_177436_1_, BlockState p_177436_2_, boolean p_177436_3_) {
|
||||
|
@ -148,11 +153,6 @@ public class WrappedChunk implements IChunk {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChunkStatus getStatus() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTileEntity(BlockPos p_177425_1_) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue