Initial port to 1.16.2
This commit is contained in:
@@ -31,8 +31,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.IServerWorld;
|
||||
import net.minecraft.world.chunk.IChunk;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
@@ -92,18 +91,14 @@ public final class CompassService {
|
||||
}
|
||||
}
|
||||
|
||||
public void tryUpdateArea(final IWorld w, ChunkPos chunkPos) {
|
||||
public void tryUpdateArea(final IServerWorld w, ChunkPos chunkPos) {
|
||||
// If this seems weird: during worldgen, WorldAccess is a specific region, but
|
||||
// getWorld is
|
||||
// still the server world. We do need to use the world access to get the chunk
|
||||
// in question
|
||||
// though, since during worldgen, it's not comitted to the actual world yet.
|
||||
World world = w.getWorld();
|
||||
if (!(world instanceof ServerWorld)) {
|
||||
return;
|
||||
}
|
||||
IChunk chunk = w.getChunk(chunkPos.x, chunkPos.z);
|
||||
updateArea((ServerWorld) world, chunk);
|
||||
updateArea(w.getWorld(), chunk);
|
||||
}
|
||||
|
||||
public void updateArea(final ServerWorld w, IChunk chunk) {
|
||||
|
||||
Reference in New Issue
Block a user