src/main/java/com/github/klikli_dev/occultism/common/entity/ai/ExtractItemsGoal.java
/**
     * Opens or closes a chest
     *
     * @param tileEntity the chest tile entity
     * @param open       true to open the chest, false to close it.
     */
Opens or closes a chest
@param tileEntity the chest tile entity
@param open       true to open the chest, false to close it.
Opens or closes a chest @param tileEntity the chest tile entity @param open true to open the chest false to close it .
public void toggleChest(IInventory tileEntity, boolean open) {
        if (tileEntity instanceof ChestTileEntity) {
            ChestTileEntity chest = (ChestTileEntity) tileEntity;
            if (open) {
                this.entity.level.blockEvent(this.targetBlock, chest.getBlockState().getBlock(), 1, 1);
            } else {
                this.entity.level.blockEvent(this.targetBlock, chest.getBlockState().getBlock(), 1, 0);
            }
        }
    }
public void toggleChest ( IInventory tileEntity , boolean open ) { if ( tileEntity instanceof ChestTileEntity ) { ChestTileEntity chest = ( ChestTileEntity ) tileEntity ; if ( open ) { this . entity . level . blockEvent ( this . targetBlock , chest . getBlockState ( ) . getBlock ( ) , 1 , 1 ) ; } else { this . entity . level . blockEvent ( this . targetBlock , chest . getBlockState ( ) . getBlock ( ) , 1 , 0 ) ; } } }
Opens or closes a chest
 @param tileEntity the chest tile entity
 @param open       true to open the chest, false to close it.
Opens or closes a chest @param tileEntity the chest tile entity @param open true to open the chest false to close it .