Dummy beats null

- Implement #2228
This commit is contained in:
simibubi 2021-10-21 18:47:38 +02:00
parent 5a621bbea4
commit 9443658431
2 changed files with 22 additions and 2 deletions

View file

@ -0,0 +1,18 @@
package com.simibubi.create.foundation.utility.worldWrappers;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.world.chunk.ChunkStatus;
import net.minecraft.world.chunk.listener.IChunkStatusListener;
public class DummyStatusListener implements IChunkStatusListener {
@Override
public void updateSpawnPos(ChunkPos p_219509_1_) {}
@Override
public void onStatusChange(ChunkPos p_219508_1_, ChunkStatus p_219508_2_) {}
@Override
public void stop() {}
}

View file

@ -37,8 +37,10 @@ public class WrappedServerWorld extends ServerWorld {
protected World world;
public WrappedServerWorld(World world) {
// Replace null with world.getChunkProvider().chunkManager.progressListener ? We had null in 1.15
super(world.getServer(), Util.backgroundExecutor(), getLevelSaveFromWorld(world), (IServerWorldInfo) world.getLevelData(), world.dimension(), world.dimensionType(), null, ((ServerChunkProvider) world.getChunkSource()).getGenerator(), world.isDebug(), world.getBiomeManager().biomeZoomSeed, Collections.EMPTY_LIST, false); //, world.field_25143);
super(world.getServer(), Util.backgroundExecutor(), getLevelSaveFromWorld(world),
(IServerWorldInfo) world.getLevelData(), world.dimension(), world.dimensionType(),
new DummyStatusListener(), ((ServerChunkProvider) world.getChunkSource()).getGenerator(), world.isDebug(),
world.getBiomeManager().biomeZoomSeed, Collections.emptyList(), false);
this.world = world;
}