91 lines
2.3 KiB
Java
91 lines
2.3 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* org.jspecify.annotations.Nullable
|
|
*/
|
|
package net.minecraft.world.level.chunk;
|
|
|
|
import net.minecraft.core.BlockPos;
|
|
import net.minecraft.core.Holder;
|
|
import net.minecraft.server.level.FullChunkStatus;
|
|
import net.minecraft.world.level.ChunkPos;
|
|
import net.minecraft.world.level.Level;
|
|
import net.minecraft.world.level.biome.Biome;
|
|
import net.minecraft.world.level.block.Block;
|
|
import net.minecraft.world.level.block.Blocks;
|
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
|
import net.minecraft.world.level.block.state.BlockState;
|
|
import net.minecraft.world.level.chunk.LevelChunk;
|
|
import net.minecraft.world.level.material.FluidState;
|
|
import net.minecraft.world.level.material.Fluids;
|
|
import org.jspecify.annotations.Nullable;
|
|
|
|
public class EmptyLevelChunk
|
|
extends LevelChunk {
|
|
private final Holder<Biome> biome;
|
|
|
|
public EmptyLevelChunk(Level level, ChunkPos pos, Holder<Biome> biome) {
|
|
super(level, pos);
|
|
this.biome = biome;
|
|
}
|
|
|
|
@Override
|
|
public BlockState getBlockState(BlockPos pos) {
|
|
return Blocks.VOID_AIR.defaultBlockState();
|
|
}
|
|
|
|
@Override
|
|
public @Nullable BlockState setBlockState(BlockPos pos, BlockState state, @Block.UpdateFlags int flags) {
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public FluidState getFluidState(BlockPos pos) {
|
|
return Fluids.EMPTY.defaultFluidState();
|
|
}
|
|
|
|
@Override
|
|
public int getLightEmission(BlockPos pos) {
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
public @Nullable BlockEntity getBlockEntity(BlockPos pos, LevelChunk.EntityCreationType creationType) {
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public void addAndRegisterBlockEntity(BlockEntity blockEntity) {
|
|
}
|
|
|
|
@Override
|
|
public void setBlockEntity(BlockEntity blockEntity) {
|
|
}
|
|
|
|
@Override
|
|
public void removeBlockEntity(BlockPos pos) {
|
|
}
|
|
|
|
@Override
|
|
public boolean isEmpty() {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public boolean isYSpaceEmpty(int yStartInclusive, int yEndInclusive) {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public FullChunkStatus getFullStatus() {
|
|
return FullChunkStatus.FULL;
|
|
}
|
|
|
|
@Override
|
|
public Holder<Biome> getNoiseBiome(int quartX, int quartY, int quartZ) {
|
|
return this.biome;
|
|
}
|
|
}
|
|
|