69 lines
3.8 KiB
Java
69 lines
3.8 KiB
Java
package com.dairymoose.modernlife.blocks;
|
|
|
|
import com.dairymoose.modernlife.util.ModernLifeUtil;
|
|
import java.util.stream.Stream;
|
|
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.phys.shapes.BooleanOp;
|
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
|
import net.minecraft.world.phys.shapes.Shapes;
|
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
|
|
|
/* loaded from: outputsrg.jar:com/dairymoose/modernlife/blocks/KitchenSinkBlock.class */
|
|
public class KitchenSinkBlock extends StandardHorizontalBlock {
|
|
protected static final VoxelShape SHAPE_SOUTH = (VoxelShape) Stream.of((Object[]) new VoxelShape[]{Block.box(6.0d, 5.25d, 1.0d, 7.0d, 6.25d, 2.0d), Block.box(0.0d, 2.15d, -0.02499999999999858d, 16.05d, 3.25d, 16.05d), Block.box(0.04999999999999982d, 0.0d, 0.025000000000000355d, 2.95d, 3.0999999999999996d, 16.0d), Block.box(13.05d, 0.0d, 0.025000000000000355d, 16.0d, 3.0999999999999996d, 16.0d), Block.box(3.0d, 0.0d, 13.05d, 13.0d, 3.0999999999999996d, 16.0d), Block.box(0.2749999999999986d, -0.04999999999999999d, 0.32500000000000107d, 15.75d, 0.09999999999999964d, 15.625d), Block.box(3.0d, 0.0d, 0.025000000000000355d, 13.05d, 3.0999999999999996d, 2.9499999999999993d), Block.box(5.5d, 3.25d, 0.25d, 10.5d, 5.25d, 3.0d), Block.box(7.525d, 6.775000000000009d, 7.549999999999999d, 8.475d, 7.300000000000008d, 8.55d), Block.box(7.625d, 6.7250000000000085d, 7.649999999999999d, 8.375d, 6.800000000000008d, 8.450000000000001d), Block.box(9.25d, 6.26d, 1.25d, 9.75d, 6.26d, 1.75d), Block.box(9.0d, 5.25d, 1.0d, 10.0d, 6.25d, 2.0d), Block.box(6.25d, 6.26d, 1.25d, 6.75d, 6.26d, 1.75d)}).reduce((v1, v2) -> {
|
|
return Shapes.join((VoxelShape) v1, (VoxelShape) v2, BooleanOp.OR);
|
|
}).get();
|
|
protected static final VoxelShape SHAPE_WEST = ModernLifeUtil.RotateVoxelShapeClockwise(SHAPE_SOUTH);
|
|
protected static final VoxelShape SHAPE_NORTH = ModernLifeUtil.RotateVoxelShapeClockwise(SHAPE_WEST);
|
|
protected static final VoxelShape SHAPE_EAST = ModernLifeUtil.RotateVoxelShapeClockwise(SHAPE_NORTH);
|
|
|
|
public KitchenSinkBlock(Properties p_i48377_1_) {
|
|
super(p_i48377_1_);
|
|
}
|
|
|
|
/* renamed from: com.dairymoose.modernlife.blocks.KitchenSinkBlock$1 */
|
|
/* loaded from: outputsrg.jar:com/dairymoose/modernlife/blocks/KitchenSinkBlock$1.class */
|
|
static /* synthetic */ class C00311 {
|
|
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.SOUTH.ordinal()] = 2;
|
|
} catch (NoSuchFieldError e2) {
|
|
}
|
|
try {
|
|
$SwitchMap$net$minecraft$core$Direction[Direction.EAST.ordinal()] = 3;
|
|
} catch (NoSuchFieldError e3) {
|
|
}
|
|
try {
|
|
$SwitchMap$net$minecraft$core$Direction[Direction.WEST.ordinal()] = 4;
|
|
} catch (NoSuchFieldError e4) {
|
|
}
|
|
}
|
|
}
|
|
|
|
public VoxelShape getShape(BlockState bs, BlockGetter reader, BlockPos pos, CollisionContext sel) {
|
|
switch (C00311.$SwitchMap$net$minecraft$core$Direction[bs.getValue(HorizontalDirectionalBlock.FACING).ordinal()]) {
|
|
case 1:
|
|
return SHAPE_NORTH;
|
|
case 2:
|
|
return SHAPE_SOUTH;
|
|
case 3:
|
|
return SHAPE_EAST;
|
|
case 4:
|
|
return SHAPE_WEST;
|
|
default:
|
|
return SHAPE_NORTH;
|
|
}
|
|
}
|
|
}
|