package net.minecraft.world.level;

import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.block.Blocks;
import javax.annotation.Nullable;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.state.BlockState;

public final class NoiseColumn implements BlockGetter {
    private final BlockState[] column;
    
    public NoiseColumn(final BlockState[] arr) {
        this.column = arr;
    }
    
    @Nullable
    @Override
    public BlockEntity getBlockEntity(final BlockPos fu) {
        return null;
    }
    
    @Override
    public BlockState getBlockState(final BlockPos fu) {
        final int integer3 = fu.getY();
        if (integer3 < 0 || integer3 >= this.column.length) {
            return Blocks.AIR.defaultBlockState();
        }
        return this.column[integer3];
    }
    
    @Override
    public FluidState getFluidState(final BlockPos fu) {
        return this.getBlockState(fu).getFluidState();
    }
}
