package com.dairymoose.modernlife.blocks;

import com.dairymoose.modernlife.util.ModernLifeUtil;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.block.state.properties.Property;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;

/* loaded from: outputsrg.jar:com/dairymoose/modernlife/blocks/WallpaperBlock.class */
public class WallpaperBlock extends StandardHorizontalBlock {
    protected static final VoxelShape SHAPE_NORTH = Block.box(0.0d, 0.0d, 15.5d, 16.0d, 16.0d, 16.0d);
    protected static final VoxelShape SHAPE_EAST = ModernLifeUtil.RotateVoxelShapeClockwise(SHAPE_NORTH);
    protected static final VoxelShape SHAPE_SOUTH = ModernLifeUtil.RotateVoxelShapeClockwise(SHAPE_EAST);
    protected static final VoxelShape SHAPE_WEST = ModernLifeUtil.RotateVoxelShapeClockwise(SHAPE_SOUTH);
    public static final BooleanProperty CORNER = BooleanProperty.create("corner");

    public WallpaperBlock(Properties p_i48377_1_) {
        super(p_i48377_1_);
        registerDefaultState((BlockState) ((BlockState) defaultBlockState().setValue(HorizontalDirectionalBlock.FACING, Direction.SOUTH)).setValue(CORNER, false));
    }

    @Override // com.dairymoose.modernlife.blocks.StandardHorizontalBlock
    protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
        builder.add(new Property[]{HorizontalDirectionalBlock.FACING, CORNER});
    }

    /* renamed from: com.dairymoose.modernlife.blocks.WallpaperBlock$1 */
    /* loaded from: outputsrg.jar:com/dairymoose/modernlife/blocks/WallpaperBlock$1.class */
    static /* synthetic */ class C00691 {
        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.WEST.ordinal()] = 3;
            } catch (NoSuchFieldError e3) {
            }
            try {
                $SwitchMap$net$minecraft$core$Direction[Direction.SOUTH.ordinal()] = 4;
            } catch (NoSuchFieldError e4) {
            }
        }
    }

    public VoxelShape getShape(BlockState p_220053_1_, BlockGetter p_220053_2_, BlockPos p_220053_3_, CollisionContext p_220053_4_) {
        switch (C00691.$SwitchMap$net$minecraft$core$Direction[p_220053_1_.getValue(HorizontalDirectionalBlock.FACING).ordinal()]) {
            case 1:
                return SHAPE_NORTH;
            case 2:
                return SHAPE_EAST;
            case 3:
                return SHAPE_WEST;
            case 4:
                return SHAPE_SOUTH;
            default:
                return SHAPE_NORTH;
        }
    }
}
