// Path: src/main/java/dev/gigaherz/enderrift/automation/AggregatorBlock.java
// public abstract class AggregatorBlock<T extends AggregatorBlockEntity> extends BaseEntityBlock
// {
//     protected AggregatorBlock(Properties properties)
//     {
//         super(properties);
//     }
// 
//     public RenderShape getRenderShape(BlockState p_49232_) {
//         return RenderShape.MODEL;
//     }
// 
//     @org.jetbrains.annotations.Nullable
//     @Override
//     public abstract BlockEntity newBlockEntity(BlockPos p_153215_, BlockState p_153216_);
// 
//     @Nullable
//     @Override
//     public abstract <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level p_153212_, BlockState p_153213_, BlockEntityType<T> p_153214_);
// 
//     @Deprecated
//     @Override
//     public void neighborChanged(BlockState state, Level world, BlockPos pos, Block otherBlock, BlockPos otherPos, boolean isMoving)
//     {
//         super.neighborChanged(state, world, pos, otherBlock, otherPos, isMoving);
// 
//         BlockEntity teSelf = world.getBlockEntity(pos);
//         if (!(teSelf instanceof AggregatorBlockEntity))
//             return;
//         ((AggregatorBlockEntity) teSelf).updateNeighbours();
//     }
// 
//     @Override
//     public void onNeighborChange(BlockState state, LevelReader world, BlockPos pos, BlockPos neighbor)
//     {
//         super.onNeighborChange(state, world, pos, neighbor);
// 
//         recheckNeighbour(world, pos, neighbor);
//     }
// 
//     protected void recheckNeighbour(BlockGetter world, BlockPos pos, BlockPos neighbor)
//     {
//         Direction side = null;
//         if (neighbor.equals(pos.east())) side = Direction.EAST;
//         if (neighbor.equals(pos.west())) side = Direction.WEST;
//         if (neighbor.equals(pos.north())) side = Direction.NORTH;
//         if (neighbor.equals(pos.south())) side = Direction.SOUTH;
//         if (neighbor.equals(pos.above())) side = Direction.UP;
//         if (neighbor.equals(pos.below())) side = Direction.DOWN;
// 
//         if (side != null && isAutomatable(world, pos, side))
//         {
//             BlockEntity teSelf = world.getBlockEntity(pos);
//             if (!(teSelf instanceof AggregatorBlockEntity))
//                 return;
//             ((AggregatorBlockEntity) teSelf).updateConnectedInventories();
//         }
//     }
// 
//     protected boolean isAutomatable(BlockGetter worldIn, BlockPos pos, Direction facing)
//     {
//         var te = worldIn.getBlockEntity(pos.relative(facing));
// 
//         return te != null && AutomationHelper.isAutomatable(te, facing.getOpposite());
//     }
// 
//     protected boolean isConnectableAutomation(BlockGetter worldIn, BlockPos pos, Direction facing)
//     {
//         var te = worldIn.getBlockEntity(pos.relative(facing));
// 
//         if (te == null)
//             return false;
// 
//         if (te instanceof AggregatorBlockEntity)
//             return true;
// 
//         return AutomationHelper.isAutomatable(te, facing.getOpposite());
//     }
// }


import com.google.common.collect.ImmutableMap;
import dev.gigaherz.enderrift.automation.AggregatorBlock;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.BaseEntityBlock;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityTicker;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.core.Direction;
import net.minecraft.core.BlockPos;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.LevelAccessor;
import javax.annotation.Nullable;
import java.util.Map;
package dev.gigaherz.enderrift.automation.proxy;



public class ProxyBlock extends AggregatorBlock<ProxyBlockEntity>
{
    public static final BooleanProperty NORTH = BlockStateProperties.NORTH;
    public static final BooleanProperty SOUTH = BlockStateProperties.SOUTH;
    public static final BooleanProperty WEST = BlockStateProperties.WEST;
    public static final BooleanProperty EAST = BlockStateProperties.EAST;
    public static final BooleanProperty UP = BlockStateProperties.UP;
    public static final BooleanProperty DOWN = BlockStateProperties.DOWN;

    private static final VoxelShape BOUNDS = Block.box(4, 4, 4, 12, 12, 12);
    private static final VoxelShape BOUNDS_NORTH = Block.box(6, 6, 0, 10, 10, 10);
    private static final VoxelShape BOUNDS_SOUTH = Block.box(6, 6, 6, 10, 10, 16);
    private static final VoxelShape BOUNDS_EAST = Block.box(6, 6, 6, 16, 10, 10);
    private static final VoxelShape BOUNDS_WEST = Block.box(0, 6, 6, 10, 10, 10);
    private static final VoxelShape BOUNDS_UP = Block.box(6, 6, 6, 10, 16, 10);
// Path: src/main/java/dev/gigaherz/enderrift/automation/AggregatorBlock.java
// public abstract class AggregatorBlock<T extends AggregatorBlockEntity> extends BaseEntityBlock
// {
//     protected AggregatorBlock(Properties properties)
//     {
//         super(properties);
//     }
// 
//     public RenderShape getRenderShape(BlockState p_49232_) {
//         return RenderShape.MODEL;
//     }
// 
//     @org.jetbrains.annotations.Nullable
//     @Override
//     public abstract BlockEntity newBlockEntity(BlockPos p_153215_, BlockState p_153216_);
// 
//     @Nullable
//     @Override
//     public abstract <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level p_153212_, BlockState p_153213_, BlockEntityType<T> p_153214_);
// 
//     @Deprecated
//     @Override
//     public void neighborChanged(BlockState state, Level world, BlockPos pos, Block otherBlock, BlockPos otherPos, boolean isMoving)
//     {
//         super.neighborChanged(state, world, pos, otherBlock, otherPos, isMoving);
// 
//         BlockEntity teSelf = world.getBlockEntity(pos);
//         if (!(teSelf instanceof AggregatorBlockEntity))
//             return;
//         ((AggregatorBlockEntity) teSelf).updateNeighbours();
//     }
// 
//     @Override
//     public void onNeighborChange(BlockState state, LevelReader world, BlockPos pos, BlockPos neighbor)
//     {
//         super.onNeighborChange(state, world, pos, neighbor);
// 
//         recheckNeighbour(world, pos, neighbor);
//     }
// 
//     protected void recheckNeighbour(BlockGetter world, BlockPos pos, BlockPos neighbor)
//     {
//         Direction side = null;
//         if (neighbor.equals(pos.east())) side = Direction.EAST;
//         if (neighbor.equals(pos.west())) side = Direction.WEST;
//         if (neighbor.equals(pos.north())) side = Direction.NORTH;
//         if (neighbor.equals(pos.south())) side = Direction.SOUTH;
//         if (neighbor.equals(pos.above())) side = Direction.UP;
//         if (neighbor.equals(pos.below())) side = Direction.DOWN;
// 
//         if (side != null && isAutomatable(world, pos, side))
//         {
//             BlockEntity teSelf = world.getBlockEntity(pos);
//             if (!(teSelf instanceof AggregatorBlockEntity))
//                 return;
//             ((AggregatorBlockEntity) teSelf).updateConnectedInventories();
//         }
//     }
// 
//     protected boolean isAutomatable(BlockGetter worldIn, BlockPos pos, Direction facing)
//     {
//         var te = worldIn.getBlockEntity(pos.relative(facing));
// 
//         return te != null && AutomationHelper.isAutomatable(te, facing.getOpposite());
//     }
// 
//     protected boolean isConnectableAutomation(BlockGetter worldIn, BlockPos pos, Direction facing)
//     {
//         var te = worldIn.getBlockEntity(pos.relative(facing));
// 
//         if (te == null)
//             return false;
// 
//         if (te instanceof AggregatorBlockEntity)
//             return true;
// 
//         return AutomationHelper.isAutomatable(te, facing.getOpposite());
//     }
// }


// Path: src/main/java/dev/gigaherz/enderrift/automation/proxy/ProxyBlock.java
import com.google.common.collect.ImmutableMap;
import dev.gigaherz.enderrift.automation.AggregatorBlock;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.BaseEntityBlock;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityTicker;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.core.Direction;
import net.minecraft.core.BlockPos;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.LevelAccessor;
import javax.annotation.Nullable;
import java.util.Map;

package dev.gigaherz.enderrift.automation.proxy;



public class ProxyBlock extends AggregatorBlock<ProxyBlockEntity>
{
    public static final BooleanProperty NORTH = BlockStateProperties.NORTH;
    public static final BooleanProperty SOUTH = BlockStateProperties.SOUTH;
    public static final BooleanProperty WEST = BlockStateProperties.WEST;
    public static final BooleanProperty EAST = BlockStateProperties.EAST;
    public static final BooleanProperty UP = BlockStateProperties.UP;
    public static final BooleanProperty DOWN = BlockStateProperties.DOWN;

    private static final VoxelShape BOUNDS = Block.box(4, 4, 4, 12, 12, 12);
    private static final VoxelShape BOUNDS_NORTH = Block.box(6, 6, 0, 10, 10, 10);
    private static final VoxelShape BOUNDS_SOUTH = Block.box(6, 6, 6, 10, 10, 16);
    private static final VoxelShape BOUNDS_EAST = Block.box(6, 6, 6, 16, 10, 10);
    private static final VoxelShape BOUNDS_WEST = Block.box(0, 6, 6, 10, 10, 10);
    private static final VoxelShape BOUNDS_UP = Block.box(6, 6, 6, 10, 16, 10);
    private static final VoxelShape BOUNDS_DOWN = Block.box(6, 0, 6, 10, 10, 10);