package com.dairymoose.modernlife.tileentities;

import javax.annotation.Nullable;
import net.minecraft.core.Direction;
import net.minecraft.world.Container;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.HopperBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;

/* loaded from: outputsrg.jar:com/dairymoose/modernlife/tileentities/IHorizontalHopper.class */
public interface IHorizontalHopper extends Container {
    public static final VoxelShape INSIDE = Block.box(2.0d, 2.0d, 2.0d, 14.0d, 14.0d, 14.0d);

    @Nullable
    Level getHopperLevel();

    double getLevelX();

    double getLevelY();

    double getLevelZ();

    default VoxelShape getSuckShape(BlockState state) {
        VoxelShape INSIDE2 = Block.box(2.0d, 2.0d, 2.0d, 14.0d, 14.0d, 14.0d);
        VoxelShape SUCK = INSIDE2;
        switch (C01581.$SwitchMap$net$minecraft$core$Direction[state.getValue(HopperBlock.FACING).ordinal()]) {
            case 1:
                VoxelShape northShape = Block.box(0.0d, 0.0d, -32.0d, 16.0d, 16.0d, 0.0d);
                SUCK = Shapes.or(SUCK, northShape);
                break;
            case 2:
                VoxelShape eastShape = Block.box(16.0d, 0.0d, 0.0d, 32.0d, 16.0d, 16.0d);
                SUCK = Shapes.or(SUCK, eastShape);
                break;
            case 3:
                VoxelShape southShape = Block.box(0.0d, 0.0d, 16.0d, 16.0d, 16.0d, 32.0d);
                SUCK = Shapes.or(SUCK, southShape);
                break;
            case 4:
                VoxelShape westShape = Block.box(-16.0d, 0.0d, 0.0d, 0.0d, 16.0d, 16.0d);
                SUCK = Shapes.or(SUCK, westShape);
                break;
        }
        return SUCK;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* renamed from: com.dairymoose.modernlife.tileentities.IHorizontalHopper$1 */
    /* loaded from: outputsrg.jar:com/dairymoose/modernlife/tileentities/IHorizontalHopper$1.class */
    public static /* synthetic */ class C01581 {
        static final /* synthetic */ int[] $SwitchMap$net$minecraft$core$Direction = new int[Direction.values().length];

        static {
            try {
                $SwitchMap$net$minecraft$core$Direction[Direction.NORTH.ordinal()] = 1;
            } catch (NoSuchFieldError e) {
            }
            try {
                $SwitchMap$net$minecraft$core$Direction[Direction.EAST.ordinal()] = 2;
            } catch (NoSuchFieldError e2) {
            }
            try {
                $SwitchMap$net$minecraft$core$Direction[Direction.SOUTH.ordinal()] = 3;
            } catch (NoSuchFieldError e3) {
            }
            try {
                $SwitchMap$net$minecraft$core$Direction[Direction.WEST.ordinal()] = 4;
            } catch (NoSuchFieldError e4) {
            }
        }
    }
}
