package net.minecraft.world.level.chunk;

import net.minecraft.world.level.TickList;
import net.minecraft.Util;
import java.util.BitSet;
import net.minecraft.world.level.levelgen.GenerationStep;
import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.block.Block;
import java.util.stream.Stream;
import net.minecraft.nbt.CompoundTag;
import it.unimi.dsi.fastutil.longs.LongSet;
import java.util.Map;
import net.minecraft.world.level.levelgen.structure.StructureStart;
import net.minecraft.world.level.levelgen.feature.StructureFeature;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.levelgen.Heightmap;
import net.minecraft.world.level.lighting.LevelLightEngine;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.block.state.BlockState;
import javax.annotation.Nullable;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.core.BlockPos;

public class ImposterProtoChunk extends ProtoChunk {
    private final LevelChunk wrapped;
    
    public ImposterProtoChunk(final LevelChunk chj) {
        super(chj.getPos(), UpgradeData.EMPTY);
        this.wrapped = chj;
    }
    
    @Nullable
    @Override
    public BlockEntity getBlockEntity(final BlockPos fu) {
        return this.wrapped.getBlockEntity(fu);
    }
    
    @Nullable
    @Override
    public BlockState getBlockState(final BlockPos fu) {
        return this.wrapped.getBlockState(fu);
    }
    
    @Override
    public FluidState getFluidState(final BlockPos fu) {
        return this.wrapped.getFluidState(fu);
    }
    
    @Override
    public int getMaxLightLevel() {
        return this.wrapped.getMaxLightLevel();
    }
    
    @Nullable
    @Override
    public BlockState setBlockState(final BlockPos fu, final BlockState cfj, final boolean boolean3) {
        return null;
    }
    
    @Override
    public void setBlockEntity(final BlockPos fu, final BlockEntity cdl) {
    }
    
    @Override
    public void addEntity(final Entity aom) {
    }
    
    @Override
    public void setStatus(final ChunkStatus chc) {
    }
    
    @Override
    public LevelChunkSection[] getSections() {
        return this.wrapped.getSections();
    }
    
    @Nullable
    @Override
    public LevelLightEngine getLightEngine() {
        return this.wrapped.getLightEngine();
    }
    
    @Override
    public void setHeightmap(final Heightmap.Types a, final long[] arr) {
    }
    
    private Heightmap.Types fixType(final Heightmap.Types a) {
        if (a == Heightmap.Types.WORLD_SURFACE_WG) {
            return Heightmap.Types.WORLD_SURFACE;
        }
        if (a == Heightmap.Types.OCEAN_FLOOR_WG) {
            return Heightmap.Types.OCEAN_FLOOR;
        }
        return a;
    }
    
    @Override
    public int getHeight(final Heightmap.Types a, final int integer2, final int integer3) {
        return this.wrapped.getHeight(this.fixType(a), integer2, integer3);
    }
    
    @Override
    public ChunkPos getPos() {
        return this.wrapped.getPos();
    }
    
    @Override
    public void setLastSaveTime(final long long1) {
    }
    
    @Nullable
    @Override
    public StructureStart<?> getStartForFeature(final StructureFeature<?> cml) {
        return this.wrapped.getStartForFeature(cml);
    }
    
    @Override
    public void setStartForFeature(final StructureFeature<?> cml, final StructureStart<?> ctz) {
    }
    
    @Override
    public Map<StructureFeature<?>, StructureStart<?>> getAllStarts() {
        return this.wrapped.getAllStarts();
    }
    
    @Override
    public void setAllStarts(final Map<StructureFeature<?>, StructureStart<?>> map) {
    }
    
    @Override
    public LongSet getReferencesForFeature(final StructureFeature<?> cml) {
        return this.wrapped.getReferencesForFeature(cml);
    }
    
    @Override
    public void addReferenceForFeature(final StructureFeature<?> cml, final long long2) {
    }
    
    @Override
    public Map<StructureFeature<?>, LongSet> getAllReferences() {
        return this.wrapped.getAllReferences();
    }
    
    @Override
    public void setAllReferences(final Map<StructureFeature<?>, LongSet> map) {
    }
    
    @Override
    public ChunkBiomeContainer getBiomes() {
        return this.wrapped.getBiomes();
    }
    
    @Override
    public void setUnsaved(final boolean boolean1) {
    }
    
    @Override
    public boolean isUnsaved() {
        return false;
    }
    
    @Override
    public ChunkStatus getStatus() {
        return this.wrapped.getStatus();
    }
    
    @Override
    public void removeBlockEntity(final BlockPos fu) {
    }
    
    @Override
    public void markPosForPostprocessing(final BlockPos fu) {
    }
    
    @Override
    public void setBlockEntityNbt(final CompoundTag le) {
    }
    
    @Nullable
    @Override
    public CompoundTag getBlockEntityNbt(final BlockPos fu) {
        return this.wrapped.getBlockEntityNbt(fu);
    }
    
    @Nullable
    @Override
    public CompoundTag getBlockEntityNbtForSaving(final BlockPos fu) {
        return this.wrapped.getBlockEntityNbtForSaving(fu);
    }
    
    @Override
    public void setBiomes(final ChunkBiomeContainer cgz) {
    }
    
    @Override
    public Stream<BlockPos> getLights() {
        return this.wrapped.getLights();
    }
    
    @Override
    public ProtoTickList<Block> getBlockTicks() {
        return new ProtoTickList<Block>(bvr -> bvr.defaultBlockState().isAir(), this.getPos());
    }
    
    @Override
    public ProtoTickList<Fluid> getLiquidTicks() {
        return new ProtoTickList<Fluid>(cwz -> cwz == Fluids.EMPTY, this.getPos());
    }
    
    @Override
    public BitSet getCarvingMask(final GenerationStep.Carving a) {
        throw Util.<UnsupportedOperationException>pauseInIde(new UnsupportedOperationException("Meaningless in this context"));
    }
    
    @Override
    public BitSet getOrCreateCarvingMask(final GenerationStep.Carving a) {
        throw Util.<UnsupportedOperationException>pauseInIde(new UnsupportedOperationException("Meaningless in this context"));
    }
    
    public LevelChunk getWrapped() {
        return this.wrapped;
    }
    
    @Override
    public boolean isLightCorrect() {
        return this.wrapped.isLightCorrect();
    }
    
    @Override
    public void setLightCorrect(final boolean boolean1) {
        this.wrapped.setLightCorrect(boolean1);
    }
}
